Skip to content

Commit be0a726

Browse files
committed
Initial check-in
1 parent 2c87fc4 commit be0a726

File tree

1,217 files changed

+37906
-53
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,217 files changed

+37906
-53
lines changed

.devcontainer/Dockerfile

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#-------------------------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4+
#-------------------------------------------------------------------------------------------------------------
5+
6+
#Python Versions
7+
#FROM python:3
8+
#Python Anaconda
9+
FROM continuumio/anaconda3
10+
11+
# Avoid warnings by switching to noninteractive
12+
ENV DEBIAN_FRONTEND=noninteractive
13+
14+
# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
15+
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
16+
# will be updated to match your local UID/GID (when using the dockerFile property).
17+
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
18+
ARG USERNAME=vscode
19+
ARG USER_UID=1000
20+
ARG USER_GID=$USER_UID
21+
#
22+
# Copy environment.yml (if found) to a temp locaition so we update the environment. Also
23+
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists.
24+
COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/
25+
26+
# Configure apt and install packages
27+
RUN apt-get update \
28+
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
29+
#
30+
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
31+
&& apt-get -y install git openssh-client less iproute2 procps lsb-release \
32+
#
33+
# Install Python Libraries
34+
&& pip --disable-pip-version-check --no-cache-dir install jupyter \
35+
&& pip --disable-pip-version-check --no-cache-dir install matplotlib \
36+
&& pip --disable-pip-version-check --no-cache-dir install pillow \
37+
&& pip --disable-pip-version-check --no-cache-dir install requests \
38+
&& pip --disable-pip-version-check --no-cache-dir install numpy \
39+
&& pip --disable-pip-version-check --no-cache-dir install pandas \
40+
&& pip --disable-pip-version-check --no-cache-dir install scikit-learn \
41+
&& pip --disable-pip-version-check --no-cache-dir install scikit-image \
42+
&& pip --disable-pip-version-check --no-cache-dir install scipy \
43+
&& pip --disable-pip-version-check --no-cache-dir install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html \
44+
&& pip --disable-pip-version-check --no-cache-dir install tensorflow \
45+
#
46+
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
47+
&& groupadd --gid $USER_GID $USERNAME \
48+
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
49+
# [Optional] Add sudo support for the non-root user
50+
&& apt-get install -y sudo \
51+
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
52+
&& chmod 0440 /etc/sudoers.d/$USERNAME \
53+
#
54+
# Clean up
55+
&& apt-get autoremove -y \
56+
&& apt-get clean -y \
57+
&& rm -rf /var/lib/apt/lists/*
58+
59+
# Switch back to dialog for any ad-hoc use of apt-get
60+
ENV DEBIAN_FRONTEND=dialog

.devcontainer/devcontainer.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "Python 3 - Anaconda",
3+
"context": "..",
4+
"dockerFile": "Dockerfile",
5+
6+
// Install python extension"
7+
"extensions":["ms-python.python"],
8+
9+
//Use Python 3.5 environment by defualt
10+
"settings": {
11+
"terminal.integrated.shell.linux": "/bin/bash",
12+
"python.pythonPath": "/opt/conda/bin/python",
13+
"terminal.integrated.inheritEnv": false,
14+
"python.linting.enabled": true,
15+
"python.linting.pylintEnabled": true,
16+
"python.linting.pylintPath": "/opt/conda/bin/pylint",
17+
},
18+
}

.devcontainer/noop.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This file copied into the container along with environment.yml* from the parent
2+
folder. This file is included to prevents the Dockerfile COPY instruction from
3+
failing if no environment.yml is found.

0 commit comments

Comments
 (0)