Skip to content

Commit

Permalink
Anaconda: Adds back 'anaconda' pkg (#580)
Browse files Browse the repository at this point in the history
* Anaconda: Adds back 'anaconda' pkg

* install 'requests' with conda

* conda update conda

* test

* removes conda update requests

* Update test: add --force
  • Loading branch information
samruddhikhandale committed May 31, 2023
1 parent 2214cbd commit 29e670e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/anaconda/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& echo "conda activate base" >> ~/.bashrc \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/add-notice.sh

# Since anaconda distribution 2023.03-1, continuumio/anaconda3 image no more contains `anaconda` pkg.
RUN conda update -n base -c defaults conda \
&& conda install --yes anaconda

# Temporary: Upgrade python packages due to mentioned CVEs
# They are installed by the base image (continuumio/anaconda3) which does not have the patch.
RUN python3 -m pip install \
Expand All @@ -54,8 +58,6 @@ RUN python3 -m pip install \
mistune \
# https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34141
numpy \
# https://github.com/devcontainers/images/issues/486
pyOpenssl \
# https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-25577
werkzeug \
# https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-32862
Expand Down
4 changes: 3 additions & 1 deletion src/anaconda/test-project/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ checkCommon

# Image specific tests
check "conda" conda --version
check "anaconda" bash -c "conda list anaconda$ | grep -oP 'anaconda\\s+\\K[^\\s]+'"
check "python" python --version
check "pylint" pylint --version
check "flake8" flake8 --version
Expand Down Expand Up @@ -42,7 +43,8 @@ checkPythonPackageVersion "werkzeug" "2.2.3"
checkPythonPackageVersion "certifi" "2022.12.07"
checkPythonPackageVersion "requests" "2.31.0"

check "conda-update-conda" bash -c "conda update -y conda"
# https://github.com/conda/conda/issues/8149
check "conda-update-conda" bash -c "conda update --force conda"
check "conda-install" bash -c "conda install -c conda-forge --yes tensorflow"
check "conda-install" bash -c "conda install -c conda-forge --yes pytorch"

Expand Down

0 comments on commit 29e670e

Please sign in to comment.