Skip to content

Commit

Permalink
refactored the docker container so that it uses nilup to manage the S…
Browse files Browse the repository at this point in the history
…DK and pypi for the pips
  • Loading branch information
wwwehr committed May 28, 2024
1 parent de6d814 commit 52da383
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions py-client/with-docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
context: .
dockerfile_inline: |
FROM python:3.10-slim
ARG NIL_SDK_VERSION
ARG DEBIAN_FRONTEND="noninteractive"
ENV PUID=1000
ENV PGID=1000
Expand All @@ -21,21 +22,25 @@ services:
USER nillion
RUN { curl -L https://foundry.paradigm.xyz | bash ; } && \
/home/nillion/.foundry/bin/foundryup
RUN curl -L https://nilup.nilogy.xyz/install.sh | bash; \
/home/nillion/.nilup/bin/nilup init; \
/home/nillion/.nilup/bin/nilup install $${NIL_SDK_VERSION}; \
/home/nillion/.nilup/bin/nilup use $${NIL_SDK_VERSION};
RUN pip install nada-dsl==$${NIL_SDK_VERSION}; \
pip install py-nillion-client==$${NIL_SDK_VERSION};
args:
- NIL_SDK_VERSION=0.2.1
network_mode: 'bridge'
environment:
- TZ=Europe/London
- NILLION_SDK_ROOT=/sdk
- PATH=/home/nillion/.local/bin:/home/nillion/.foundry/bin:${PATH}
- PATH=/home/nillion/.local/bin:/home/nillion/.foundry/bin:/home/nillion/.nilup/bin:/home/nillion/.nillion/bin:${PATH}
volumes:
- '$PWD/../../:/host'
- $NILLION_SDK_ROOT:/sdk
working_dir: /host
command:
- /bin/bash
- '-c'
- |
/host/tools/bootstrap-local-environment.sh py-client/compute-basic && \
pushd py-client/compute-basic && \
source activate_virtualenv.sh && \
python3 install_nillion_pip.py && \
python3 client.py

0 comments on commit 52da383

Please sign in to comment.