Skip to content

Commit

Permalink
Merge pull request #23 from Anaconda-Platform/activate
Browse files Browse the repository at this point in the history
Always activate the project env
  • Loading branch information
AlbertDeFusco authored Aug 12, 2020
2 parents 81b83e3 + 8e302c9 commit 3be407f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def docker_build(base_editor, suffix='vscode', push=False, airgapped=False):
if airgapped:
build_args.append('--build-arg AIRGAPPED=TRUE')

cmd = ("docker build --network host {build_args} -t {vscode_image} ."
cmd = ("docker build --no-cache --network host {build_args} -t {vscode_image} ."
.format(build_args=' '.join(build_args), vscode_image=vscode_image)
)
print(cmd)
Expand Down
14 changes: 7 additions & 7 deletions manifest.yml.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Updates code-server to 3.4.1 and ms-python extension to 2020.5.86806

patch_python_extension.py:
- url: https://ae5-vscode-extensions.s3.amazonaws.com/patch_python_extension.py
sha256: 9ea080b07fac8135e2aa95f0cf6290aca07a1f981d7c955d96cb0706882a6778

code-server.tar.gz:
- url: https://ae5-vscode-extensions.s3.amazonaws.com/code-server-3.4.1-linux-amd64.tar.gz
sha256: afdb89f4dc7201c03cb35d4f8dc1ccb6060bd0da324a6789089de264d3406817

extensions:
- url: https://ae5-vscode-extensions.s3.amazonaws.com/ae5-session-0.3.1.vsix
sha256: 412264942db710e52506974ca9e4c99dd681be3fb6707fb55a4cfabf1f941167

- url: https://ae5-vscode-extensions.s3.amazonaws.com/ms-python-release-2020.6.89148.vsix
sha256: 3dd114ae62a7aa8b71609b42fbab2a11e4f335a878848b0376fef67f321c10f1
post_install:
- "/opt/continuum/anaconda/envs/lab_launch/bin/python patch_python_extension.py /opt/continuum/.vscode/extensions/ms-python.python-2020.6.89148 --preparing-env"

- url: https://ae5-vscode-extensions.s3.amazonaws.com/ms-python-release-2020.5.86806.vsix
sha256: a4191fefc0e027fbafcd87134ac89a8b1afef4fd8b9dc35f14d6ee7bdf186348

post_install:
- "/opt/continuum/anaconda/envs/lab_launch/bin/python patch_python_extension.py /opt/continuum/.vscode/extensions/ms-python.python-2020.5.86806 --preparing-env"
2 changes: 2 additions & 0 deletions start_vscode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ echo "|---"
sed 's@^@| @' $OCV/project.code-workspace
echo "|---"

sed -E -i 's@lab_launch@'"$CONDA_DESIRED_ENV"'@' $OCV/activate-env-spec.sh

python /opt/continuum/scripts/merge_vscode_settings.py $SETTINGS

export NODE_EXTRA_CA_CERTS=$OCLL/ssl/cacert.pem
Expand Down
3 changes: 3 additions & 0 deletions vscode/activate-env-spec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
source ~/.bashrc
conda activate lab_launch
4 changes: 3 additions & 1 deletion vscode/admin_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
"extensions.ignoreRecommendations": true,
"extensions.showRecommendationsOnlyOnDemand": true,
"workbench.startupEditor": "none",
"terminal.integrated.inheritEnv": false
"terminal.integrated.inheritEnv": false,
"terminal.integrated.shellArgs.linux": ["--init-file", "/opt/continuum/.vscode/activate-env-spec.sh"],
"python.terminal.activateEnvironment": false
}

0 comments on commit 3be407f

Please sign in to comment.