Skip to content

Commit 9fe4ac9

Browse files
authored
Merge pull request #540 from microsoft/copilot/fix-0a4ee4e2-eb34-491b-9e05-6fe91dcd734c
[WIP] conda env update breaks container building in WSL
2 parents 7aa444a + d567e2d commit 9fe4ac9

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/
77
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
88
# && apt-get -y install libgl1
99

10-
# Copy environment.yml (if found) to a temp location so we update the environment. Also
11-
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists.
12-
COPY .devcontainer/environment.yml* .devcontainer/requirements.txt /tmp/conda-tmp/
13-
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
10+
# Copy requirements.txt to a temp location for package installation
11+
COPY .devcontainer/requirements.txt /tmp/conda-tmp/
12+
# Install packages using conda and pip directly to avoid hanging on environment solving
13+
RUN umask 0002 \
14+
&& /opt/conda/bin/conda install -y -c conda-forge -c pytorch -c defaults \
15+
python pip ipykernel ipython ipywidgets jupyter matplotlib=3.9 numpy=1.26 \
16+
requests=2.32 scikit-learn scipy=1.13 opencv setuptools \
17+
pytorch torchtext torchvision torchdata \
18+
&& /opt/conda/bin/pip install --no-cache-dir -r /tmp/conda-tmp/requirements.txt \
1419
&& rm -rf /tmp/conda-tmp
1520

1621
# [Optional] Uncomment to install a different version of Python than the default

0 commit comments

Comments
 (0)