This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#----------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See LICENSE in the project root for license information. | ||
#----------------------------------------------------------------------------------------- | ||
|
||
FROM continuumio/anaconda3 | ||
|
||
# Copy default endpoint specific user settings overrides into container to specify Python path | ||
COPY .devcontainer/settings.vscode.json /root/.vscode-remote/data/Machine/settings.json | ||
|
||
# Install git, process tools | ||
RUN apt-get update && apt-get -y install git procps | ||
|
||
# Install any missing dependencies for enhanced language service | ||
RUN apt-get install -y libicu[0-9][0-9] | ||
|
||
# Install Python dependencies from requirements.txt if it exists | ||
COPY .devcontainer/environment.yml.temp environment.yml* /workspace/ | ||
RUN if [ -f "environment.yml" ]; then conda install environment.yml && rm environment.yml*; fi | ||
|
||
# Expose port 5000 as the default web port | ||
EXPOSE 5000 | ||
|
||
# Clean up | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
10 changes: 10 additions & 0 deletions
10
containers/python-3-anaconda/.devcontainer/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "Anaconda 3", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "app", | ||
"workspaceFolder": "/workspace", | ||
"extensions": [ | ||
"ms-python.python", | ||
"VisualStudioExptTeam.vscodeintellicode" | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
containers/python-3-anaconda/.devcontainer/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '3' | ||
|
||
services: | ||
app: | ||
build: | ||
context: .. | ||
dockerfile: .devcontainer/Dockerfile | ||
ports: | ||
- 5000:5000 | ||
volumes: | ||
- ..:/workspace | ||
command: sleep infinity |
Empty file.
3 changes: 3 additions & 0 deletions
3
containers/python-3-anaconda/.devcontainer/settings.vscode.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"python.pythonPath": "/opt/conda/bin/python" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
README.md | ||
test-project | ||
.vscode | ||
.npmignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Current File (Integrated Terminal)", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"python.pythonPath": "/opt/conda/bin/python" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Python 3 | ||
|
||
## Summary | ||
|
||
*A basic dev container definition for developing Python 3 applications in an Anaconda container. Installs dependencies from your environment.yml file and the Python extension.* | ||
|
||
| Metadata | Value | | ||
|----------|-------| | ||
| *Contributors* | The VS Code Team | | ||
| *Definition type* | Dockerfile | | ||
| *Languages, platforms* | Python | | ||
|
||
## Usage | ||
|
||
[See here for information on using this definition with an existing project](../../README.md#using-a-definition). | ||
|
||
If you prefer, you can also just look through the contents of the `.devcontainer` folder to understand how to make changes to your own project. | ||
|
||
If you want to try out the test project instead, run **Remote-Container: Open Folder in Container...** in VS Code and select a cloned copy of the entire folder. | ||
|
||
Then, open test-project/hello.py and press shift-enter to run the cell and see the interactive matplotlib output. | ||
|
||
## License | ||
|
||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
||
Licensed under the MIT License. See [LICENSE](../../LICENSE). |