Skip to content

Commit 3be407f

Browse files
Merge pull request #23 from Anaconda-Platform/activate
Always activate the project env
2 parents 81b83e3 + 8e302c9 commit 3be407f

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def docker_build(base_editor, suffix='vscode', push=False, airgapped=False):
2424
if airgapped:
2525
build_args.append('--build-arg AIRGAPPED=TRUE')
2626

27-
cmd = ("docker build --network host {build_args} -t {vscode_image} ."
27+
cmd = ("docker build --no-cache --network host {build_args} -t {vscode_image} ."
2828
.format(build_args=' '.join(build_args), vscode_image=vscode_image)
2929
)
3030
print(cmd)

manifest.yml.example

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1+
# Updates code-server to 3.4.1 and ms-python extension to 2020.5.86806
2+
13
patch_python_extension.py:
24
- url: https://ae5-vscode-extensions.s3.amazonaws.com/patch_python_extension.py
35
sha256: 9ea080b07fac8135e2aa95f0cf6290aca07a1f981d7c955d96cb0706882a6778
4-
6+
57
code-server.tar.gz:
68
- url: https://ae5-vscode-extensions.s3.amazonaws.com/code-server-3.4.1-linux-amd64.tar.gz
79
sha256: afdb89f4dc7201c03cb35d4f8dc1ccb6060bd0da324a6789089de264d3406817
8-
910
extensions:
1011
- url: https://ae5-vscode-extensions.s3.amazonaws.com/ae5-session-0.3.1.vsix
1112
sha256: 412264942db710e52506974ca9e4c99dd681be3fb6707fb55a4cfabf1f941167
1213

13-
- url: https://ae5-vscode-extensions.s3.amazonaws.com/ms-python-release-2020.6.89148.vsix
14-
sha256: 3dd114ae62a7aa8b71609b42fbab2a11e4f335a878848b0376fef67f321c10f1
15-
post_install:
16-
- "/opt/continuum/anaconda/envs/lab_launch/bin/python patch_python_extension.py /opt/continuum/.vscode/extensions/ms-python.python-2020.6.89148 --preparing-env"
17-
14+
- url: https://ae5-vscode-extensions.s3.amazonaws.com/ms-python-release-2020.5.86806.vsix
15+
sha256: a4191fefc0e027fbafcd87134ac89a8b1afef4fd8b9dc35f14d6ee7bdf186348
1816

17+
post_install:
18+
- "/opt/continuum/anaconda/envs/lab_launch/bin/python patch_python_extension.py /opt/continuum/.vscode/extensions/ms-python.python-2020.5.86806 --preparing-env"

start_vscode.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ echo "|---"
2323
sed 's@^@| @' $OCV/project.code-workspace
2424
echo "|---"
2525

26+
sed -E -i 's@lab_launch@'"$CONDA_DESIRED_ENV"'@' $OCV/activate-env-spec.sh
27+
2628
python /opt/continuum/scripts/merge_vscode_settings.py $SETTINGS
2729

2830
export NODE_EXTRA_CA_CERTS=$OCLL/ssl/cacert.pem

vscode/activate-env-spec.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
source ~/.bashrc
3+
conda activate lab_launch

vscode/admin_settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
"extensions.ignoreRecommendations": true,
99
"extensions.showRecommendationsOnlyOnDemand": true,
1010
"workbench.startupEditor": "none",
11-
"terminal.integrated.inheritEnv": false
11+
"terminal.integrated.inheritEnv": false,
12+
"terminal.integrated.shellArgs.linux": ["--init-file", "/opt/continuum/.vscode/activate-env-spec.sh"],
13+
"python.terminal.activateEnvironment": false
1214
}

0 commit comments

Comments
 (0)