microsoft/AI-For-Beginners
Publicmirrored fromhttps://github.com/microsoft/AI-For-BeginnersAvailable
.devcontainer/Dockerfile
25lines · modecode
| 1 | FROM mcr.microsoft.com/vscode/devcontainers/miniconda:0-3 |
| 2 | |
| 3 | # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 |
| 4 | ARG NODE_VERSION="none" |
| 5 | RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi |
| 6 | |
| 7 | # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ |
| 8 | # && apt-get -y install libgl1 |
| 9 | |
| 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 \ |
| 19 | && rm -rf /tmp/conda-tmp |
| 20 | |
| 21 | # [Optional] Uncomment to install a different version of Python than the default |
| 22 | # RUN conda install -y python=3.6 \ |
| 23 | # && pip install --no-cache-dir pipx \ |
| 24 | # && pipx reinstall-all |
| 25 | |
| 26 | |