Skip to content

Commit

Permalink
deactivate conda when custom python env is set (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
ihiverlet authored Dec 1, 2024
1 parent a564fb4 commit f0c3029
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions python-minimal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ RUN /opt/install-conda.sh && \
conda env update -n base -f conda-env.yml && \
# Install duckdb extensions
conda run -n base python /opt/install-duckdb-extensions.py && \
# Activate custom Conda env by default in shell
echo ". ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate" >> ${HOME}/.bashrc && \
# Fix permissions
chown -R ${USERNAME}:${GROUPNAME} ${HOME} ${CONDA_DIR} && \
# Clean
Expand Down
5 changes: 5 additions & 0 deletions scripts/onyxia-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,5 +226,10 @@ if [[ -n "$PERSONAL_INIT_SCRIPT" ]]; then
curl $PERSONAL_INIT_SCRIPT | bash -s -- $PERSONAL_INIT_ARGS
fi

# Activate Conda env by default in shell except if specified otherwise
if [[ "$CUSTOM_PYTHON_ENV" != "true" ]]; then
echo ". ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate" >> ${HOME}/.bashrc ;
fi

echo "execution of $@"
exec "$@"

0 comments on commit f0c3029

Please sign in to comment.