Skip to content

Commit

Permalink
Add github codespaces config for web-based dev environment (#728)
Browse files Browse the repository at this point in the history
* added dev containter

* added post create install

* image with python
  • Loading branch information
shimwell committed Jun 23, 2022
1 parent 97ba5ee commit 4894a56
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# A vscode remote container docker image with conda from
# https://hub.docker.com/_/microsoft-vscode-devcontainers

# A vscode remote container docker image with conda from
# https://hub.docker.com/_/microsoft-vscode-devcontainers
FROM mcr.microsoft.com/vscode/devcontainers/python:3.10
44 changes: 44 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

{
"name": "Python 3",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
]
}
},

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip install -e .",
"postCreateCommand": "pip install -r requirements.txt",

// Allows port 8888 used for Jupyter Notebook to be available locally.
"forwardPorts": [8888],
"remoteUser": "vscode"
}

0 comments on commit 4894a56

Please sign in to comment.