forked from conda/conda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable one-click gitpod and GitHub Codespaces setup for Linux develop…
…ment (conda#11040)
- Loading branch information
Showing
5 changed files
with
92 additions
and
2 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,31 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.3/containers/python-3 | ||
{ | ||
"name": "Linux / Python 3.9", | ||
"image": "ghcr.io/conda/conda-ci:master-linux-python3.9", | ||
"containerEnv": { | ||
"RUNNING_ON_DEVCONTAINER": "1" | ||
}, | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"python.pythonPath": "/opt/conda/bin/python", | ||
"terminal.integrated.profiles.linux": { | ||
"Conda Bash": { | ||
"path": "/bin/bash", | ||
"args": ["--rcfile", "/home/test_user/.bashrc"] | ||
} | ||
}, | ||
"terminal.integrated.defaultProfile.linux": "Conda Bash" | ||
}, | ||
|
||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"eamodio.gitlens" | ||
], | ||
|
||
"postAttachCommand": ["/bin/bash", "/workspaces/conda/dev/docker.bashrc"], | ||
|
||
"remoteUser": "test_user" | ||
} |
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,38 @@ | ||
# TODO: Replace gitpod with master | ||
image: ghcr.io/conda/conda-ci:gitpod-linux-python3.9 | ||
tasks: | ||
- name: initialize | ||
init: | | ||
mkdir -p .vscode | ||
echo '{"python.pythonPath": "/opt/conda/bin/python"}' > .vscode/settings.json | ||
git tag "$(git tag --sort=committerdate | tail -1).dev" | ||
eval "$(sudo /opt/conda/bin/python -m conda init --dev bash)" | ||
sudo su root -c "/opt/conda/bin/conda install -yq conda-build" | ||
conda-build tests/test-recipes/activate_deactivate_package | ||
command: | | ||
eval "$(sudo /opt/conda/bin/python -m conda init --dev bash)" | ||
vscode: | ||
extensions: | ||
- eamodio.gitlens | ||
- ms-python.python | ||
- ms-python.vscode-pylance | ||
|
||
github: | ||
prebuilds: | ||
# enable for master branch | ||
master: true | ||
# enable for other branches (defaults to false) | ||
branches: false | ||
# enable for pull requests coming from this repo (defaults to true) | ||
pullRequests: false | ||
# enable for pull requests coming from forks (defaults to false) | ||
pullRequestsFromForks: false | ||
# add a check to pull requests (defaults to true) | ||
addCheck: false | ||
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false) | ||
addComment: false | ||
# add a "Review in Gitpod" button to the pull request's description (defaults to false) | ||
addBadge: false | ||
# add a label once the prebuild is ready to pull requests (defaults to false) | ||
addLabel: false |
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
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
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,11 @@ | ||
#!/bin/bash | ||
|
||
echo "Initializing conda in dev mode..." | ||
echo "Factory config is:" | ||
grep -e "conda location" -e "conda version" -e "python version" <(conda info -a) | sed 's/^\s*/ /' | ||
eval "$(sudo /opt/conda/bin/python -m conda init --dev bash)" | ||
if [[ $RUNNING_ON_DEVCONTAINER == 1 ]]; then | ||
conda init | ||
fi | ||
echo "Done! Now running:" | ||
grep -e "conda location" -e "conda version" -e "python version" <(conda info -a) | sed 's/^\s*/ /' |