From 0f086245be2217b2fbe7946e4f1296c2b17e0fa7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Oct 2025 12:22:20 +0000 Subject: [PATCH 2/3] Fix conda env update hanging in WSL by using direct package installation Co-authored-by: leestott <2511341+leestott@users.noreply.github.com> --- .devcontainer/Dockerfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b5b0b708..525c39b6 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -7,10 +7,15 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/ # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # && apt-get -y install libgl1 -# Copy environment.yml (if found) to a temp location so we update the environment. Also -# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists. -COPY .devcontainer/environment.yml* .devcontainer/requirements.txt /tmp/conda-tmp/ -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 \ +# Copy requirements.txt to a temp location for package installation +COPY .devcontainer/requirements.txt /tmp/conda-tmp/ +# Install packages using conda and pip directly to avoid hanging on environment solving +RUN umask 0002 \ + && /opt/conda/bin/conda install -y -c conda-forge -c pytorch -c defaults \ + ipykernel ipython ipywidgets jupyter matplotlib=3.9 numpy=1.26 \ + requests=2.32 scikit-learn scipy=1.13 opencv setuptools \ + pytorch torchtext torchvision torchdata \ + && /opt/conda/bin/pip install --no-cache-dir -r /tmp/conda-tmp/requirements.txt \ && rm -rf /tmp/conda-tmp # [Optional] Uncomment to install a different version of Python than the default From d567e2d67eba8e8c6dab3246de7ee90562a47c0b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Oct 2025 12:23:36 +0000 Subject: [PATCH 3/3] Add python and pip to conda install for completeness Co-authored-by: leestott <2511341+leestott@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 525c39b6..5023b65f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -12,7 +12,7 @@ COPY .devcontainer/requirements.txt /tmp/conda-tmp/ # Install packages using conda and pip directly to avoid hanging on environment solving RUN umask 0002 \ && /opt/conda/bin/conda install -y -c conda-forge -c pytorch -c defaults \ - ipykernel ipython ipywidgets jupyter matplotlib=3.9 numpy=1.26 \ + python pip ipykernel ipython ipywidgets jupyter matplotlib=3.9 numpy=1.26 \ requests=2.32 scikit-learn scipy=1.13 opencv setuptools \ pytorch torchtext torchvision torchdata \ && /opt/conda/bin/pip install --no-cache-dir -r /tmp/conda-tmp/requirements.txt \