Skip to content

Commit 121dae4

Browse files
authored
support custom ennvironment packages by environemnt.yml (Azure#1005)
1 parent 73d8eaf commit 121dae4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Diff for: .devcontainer/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ WORKDIR /root/.jupyter
2525
COPY jupyter_server_config.py jupyter_server_config.py
2626
WORKDIR /root
2727
COPY .start.sh .start_jupyter.sh
28+
29+
# This is to support updating conda environment with user supplied packages with environment.yml
30+
COPY environment.yml* no_op.txt /tmp/conda-tmp/
31+
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /miniconda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
32+
&& rm -rf /tmp/conda-tmp

Diff for: .devcontainer/no_op.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This file is copied into the container along with environment.yml* from the
2+
parent folder. This is done to prevent the Dockerfile COPY instruction from
3+
failing if no environment.yml is found.

0 commit comments

Comments
 (0)