microsoft/AI-For-Beginners

Public

mirrored fromhttps://github.com/microsoft/AI-For-BeginnersAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
1987d9edf9186ab7262c2b48b7797e303a7a3e78

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.devcontainer/Dockerfile

25lines · modecode

1FROM mcr.microsoft.com/vscode/devcontainers/miniconda:0-3
2
3# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
4ARG NODE_VERSION="none"
5RUN 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
11COPY .devcontainer/requirements.txt /tmp/conda-tmp/
12# Install packages using conda and pip directly to avoid hanging on environment solving
13RUN 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