Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where vscode extensions are not installing #1360

Merged
merged 36 commits into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
39689d5
rollback to code-server installation
viniciusdc Jul 5, 2022
67a8588
test if build passes
viniciusdc Jul 5, 2022
efed55f
bump dask-labextension to fix CI
viniciusdc Jul 5, 2022
7b124be
update image again test CI
viniciusdc Jul 5, 2022
c0fd620
update image again test CI
viniciusdc Jul 5, 2022
90ee8a7
rollback to code-server installation
viniciusdc Jul 5, 2022
edd8c03
rollback dask-lab version
viniciusdc Jul 5, 2022
2c9eaa4
install extension from conda
viniciusdc Jul 5, 2022
6144772
change install location to use local env
viniciusdc Jul 5, 2022
ad49fa6
change install location to use local env
viniciusdc Jul 5, 2022
1635bd3
change install location to use local env
viniciusdc Jul 6, 2022
c27899f
change install location to use local env
viniciusdc Jul 6, 2022
93c24ef
Update script installation
viniciusdc Jul 6, 2022
9cd02b8
Try to fix missing path
viniciusdc Jul 6, 2022
419fbb8
Try to fix missing path
viniciusdc Jul 6, 2022
0f3c505
try something else
viniciusdc Jul 6, 2022
8fbcb8e
try something else
viniciusdc Jul 6, 2022
42e0883
Trigger CI build
viniciusdc Jul 6, 2022
6a3fdd0
try something else
viniciusdc Jul 6, 2022
7a98f42
Rollback to previous conda install
viniciusdc Jul 6, 2022
730feaf
Use jupyter proxy instead of changing installation
viniciusdc Jul 6, 2022
dade74d
Update install method
viniciusdc Jul 6, 2022
9f3bea4
rm proxy settings
viniciusdc Jul 6, 2022
dfc8283
add code-server to path
viniciusdc Jul 6, 2022
983ff94
add code-server to path
viniciusdc Jul 6, 2022
012dd77
Will fix everything
viniciusdc Jul 6, 2022
6aa3959
Will fix everything 2
viniciusdc Jul 6, 2022
0cbd4ed
fix dir typo
viniciusdc Jul 6, 2022
3206b6c
missed another typo again
viniciusdc Jul 6, 2022
6a6a857
Will fix everything 3
viniciusdc Jul 6, 2022
0de3de9
Will fix everything 4
viniciusdc Jul 6, 2022
a07201f
Will fix everything 4
viniciusdc Jul 6, 2022
3cfc295
Will fix everything 5
viniciusdc Jul 6, 2022
82d59a4
rm external proxy and use jupyter builtin
viniciusdc Jul 6, 2022
d50aa58
rollback to using vscode proxy
viniciusdc Jul 6, 2022
cf640e1
Update qhub/template/image/jupyterlab/environment.yaml
iameskild Jul 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions qhub/template/image/Dockerfile.jupyterlab
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ RUN \
fi ; \
/opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true'

# ========== code-server install ============
ENV PATH=/opt/conda/envs/${DEFAULT_ENV}/share/code-server/bin:${PATH}
COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh

COPY jupyterlab /opt/jupyterlab
RUN /opt/jupyterlab/postBuild

Expand Down
6 changes: 1 addition & 5 deletions qhub/template/image/jupyterlab/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
- retrolab

# jupyterlab extensions
# - dask_labextension >=5.0.0
- dask_labextension == 5.3.0
viniciusdc marked this conversation as resolved.
Show resolved Hide resolved
iameskild marked this conversation as resolved.
Show resolved Hide resolved
- jupyterlab-git >=0.30.0
- sidecar >=0.5.0
- jupyter-videochat >=0.5.0
Expand Down Expand Up @@ -48,10 +48,6 @@ dependencies:
- isort
- importnb

# vscode
- code-server >= 3.2

- pip:
# vscode jupyterlab launcher
- git+https://github.com/betatim/vscode-binder
- git+https://github.com/dask/dask-labextension.git@fc8de03447778e0605d0abafa3d3135f9e49e0d6
4 changes: 4 additions & 0 deletions qhub/template/image/jupyterlab/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ set -x
# install classic notebook extensions
jupyter nbextension enable --py widgetsnbextension --sys-prefix

# install code-server extension
sh /opt/scripts/install-code-server.sh "/opt/conda/envs/${DEFAULT_ENV}/share"


# if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise
# it substitutes the string x. This allows us to check if the variable
# is set without triggering an unbound variable error
Expand Down
21 changes: 21 additions & 0 deletions qhub/template/image/scripts/install-code-server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -xe
DEFAULT_PREFIX="${1}"; shift # path to environment yaml or lock file

mkdir -p ${DEFAULT_PREFIX}/code-server
cd ${DEFAULT_PREFIX}/code-server

# Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing
wget --quiet https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh
expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253

if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then
echo Unexpected hash from code-server install script
exit 1
fi

mkdir /opt/tmpdir
sh ./install.sh --method standalone --prefix /opt/tmpdir

mv /opt/tmpdir/lib/code-server-4.5.0/* ${DEFAULT_PREFIX}/code-server
rm -rf /opt/tmpdir