NASA-Openscapes / corn

Base image for the NASA-Openscapes Jupyterhub
MIT License
4 stars 5 forks source link

Install vscode extensions, attempt #3 #32

Closed ateucher closed 4 months ago

ateucher commented 4 months ago

Initially we assumed that extensions would be default be installed in $HOME, which we wanted to avoid (#30, #31). But it turns out that code-server from conda-forge sets the --extensions-dir flag to ${CONDA_PREFIX}/share/code-server/extensions, which resolves to /srv/conda/envs/notebook/share/code-server/extensions - i.e., outside of $HOME. So I don't think we need to configure anything; we should just be able to install the extensions we want in the Dockerfile.

I tested this locally (macOS arm), and it worked:

docker build -t openscapes/corn:test . --platform linux/amd64
docker run -p 8888:8888 --platform linux/amd64 openscapes/corn:test jupyter lab --ip 0.0.0.0

I had to remove the postBuild, as the awsv2 install was failing (on macOS).

ateucher commented 4 months ago

I've been trying out the quarto extension with a locally built image with these changes. It wants to write to $HOME/.cache/, but it belongs to root? In the hub however, ~/.cache belongs to jovyan (which I assume is how it should be). I don't see how these changes would cause that... any ideas @betolink?

ateucher commented 4 months ago

I just ran the image built from main, and it also has ~/.cache owned by root... that must be fixed when it's deployed. So maybe that's not an issue here...