Skip to content

Commit

Permalink
fix: make virtual env available to all users
Browse files Browse the repository at this point in the history
  • Loading branch information
plexoos committed Aug 21, 2024
1 parent 6f26574 commit 475e9a0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ ENV VIRTUAL_ENV_DISABLE_PROMPT=1
ENV TMP=/tmp
ENV CMAKE_PREFIX_PATH=${OPTICKS_PREFIX}

RUN mkdir -p /opt/pypoetry

ENV POETRY_CONFIG_DIR=/opt/pypoetry/config
ENV POETRY_VIRTUALENVS_PATH=/opt/pypoetry/venv
ENV POETRY_DATA_DIR=/opt/pypoetry/share
ENV POETRY_CACHE_DIR=/opt/pypoetry/cache

WORKDIR $ESI_DIR

COPY .opticks .opticks
Expand All @@ -110,12 +117,12 @@ COPY NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh .
COPY pyproject.toml .

RUN poetry install
RUN chmod -R 777 /opt/pypoetry

COPY <<-"EOF" /etc/profile.d/z20_opticks.sh
source $(poetry env info --path)/bin/activate
source $OPTICKS_HOME/opticks.bash
opticks-
EOF
RUN echo -e "\
source $(poetry env info --path)/bin/activate \n\
source $OPTICKS_HOME/opticks.bash \n\
opticks-" >> /etc/profile.d/z20_opticks.sh

RUN mkdir -p $OPTIX_DIR && ./NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh --skip-license --prefix=$OPTIX_DIR

Expand Down

0 comments on commit 475e9a0

Please sign in to comment.