Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,32 @@ optional arguments:

----

== Build and install instructions

Install Docker Engine:

https://docs.docker.com/engine/install/ubuntu/

Post docker install, add current user to docker group:

https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user

Ubuntu:
[source, bash]
----
sudo apt-get -y install build-essential python3 python3-env

python3 -m pip install pipenv

# For Ubuntu Jammy ( 22.04 ):
make output-ubuntu-jammy
chmod +x out/ubuntu/jammy/radixnode
sudo cp out/ubuntu/jammy/radixnode /usr/local/bin/radixnode


# For Ubuntu Focal ( 20.04 ):
make output-ubuntu-focal
chmod +x out/ubuntu/focal/radixnode
sudo cp out/ubuntu/focal/radixnode /usr/local/bin/radixnode

----
43 changes: 43 additions & 0 deletions node-runner-cli/Dockerfile.ubuntujammy
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM ubuntu:22.04 as BUILD
MAINTAINER radixdlt <devops@radixdlt.com>

ENV DEBIAN_FRONTEND noninteractive
ENV PYTHON_VERSION 3.10

CMD /bin/bash

RUN apt-get update \
&& apt-get install -y --no-install-recommends make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev ca-certificates git > /dev/null



ENV PYENV_ROOT /root/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH

# Install pyenv
RUN set -ex \
&& curl https://pyenv.run | bash \
&& pyenv update


RUN CONFIGURE_OPTS=--enable-shared pyenv install 3.10



RUN pyenv virtualenv 3.10 nodecli
RUN pyenv local nodecli
RUN pip install pyinstaller==4.10

WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt

COPY . /app
RUN pyinstaller --onefile --windowed radixnode.spec

RUN DISABLE_VERSION_CHECK=true /app/dist/radixnode version

FROM scratch AS export-stage
COPY --from=BUILD /app/dist /
5 changes: 4 additions & 1 deletion node-runner-cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ install:
$(shell chmod +x add-version.sh)
$(shell ./add-version.sh)
pip install pipenv
pipenv lock -r > requirements.txt
pipenv requirements > requirements.txt

.PHONY: output
output-ubuntu-focal: install
DOCKER_BUILDKIT=1 docker build --output type=local,dest=out/ubuntu/focal --progress plain -f Dockerfile.ubuntufocal .

output-ubuntu-jammy: install
DOCKER_BUILDKIT=1 docker build --output type=local,dest=out/ubuntu/jammy --progress plain -f Dockerfile.ubuntujammy .

.PHONY: local
local: install
pip install -r requirements.txt
Expand Down