Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 12 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM codercom/code-server:4.4.0
ARG PYTHON_VERSION=3.10
ARG QUARTO_VERSION="0.9.393"

USER root

# Install common softwares
# Install system libraries
RUN apt-get -y update && \
curl -s https://raw.githubusercontent.com/InseeFrLab/onyxia/main/resources/common-software-docker-images.sh | bash -s && \
apt-get install -y --no-install-recommends cmake g++ && \
rm -rf /var/lib/apt/lists/*

# Install QUARTO
ARG QUARTO_VERSION="0.9.508"
RUN wget "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb"
RUN apt install "./quarto-${QUARTO_VERSION}-linux-amd64.deb"

Expand All @@ -30,14 +30,20 @@ RUN conda create -n basesspcloud python=$PYTHON_VERSION
COPY environment.yml .
RUN mamba env update -n basesspcloud -f environment.yml

# Make basesspcloud env activated by default in shells
# Use basesspcloud env by default
RUN echo '. "/home/coder/local/bin/conda/etc/profile.d/conda.sh"' >> /home/coder/.bashrc
RUN echo 'conda activate basesspcloud' >> /home/coder/.bashrc
ENV PATH="/home/coder/local/bin/conda/envs/basesspcloud/bin:${PATH}"
RUN echo "export PATH=$PATH" >> /home/coder/.bashrc # Temporary fix while PATH gets overwritten by code-server
RUN echo "export PATH=$PATH" >> /home/coder/.bashrc

# Switch back to non-root user
USER coder

# Additional VSCode settings
# Put in remote settings because : https://github.com/coder/code-server/issues/4609
RUN mkdir -p /home/coder/.local/share/code-server/User/
COPY --chown=coder:coder settings/User.json /home/coder/.local/share/code-server/User/settings.json
RUN mkdir -p /home/coder/.local/share/code-server/Machine/
COPY settings.json /home/coder/.local/share/code-server/Machine/settings.json
COPY --chown=coder:coder settings/Machine.json /home/coder/.local/share/code-server/Machine/settings.json

# INSTALL VSTUDIO EXTENSIONS
RUN code-server --install-extension ms-python.python
Expand Down
8 changes: 0 additions & 8 deletions settings.json

This file was deleted.

3 changes: 3 additions & 0 deletions settings/Machine.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.defaultInterpreterPath": "/home/coder/local/bin/conda/envs/basesspcloud/bin/python"
}
8 changes: 8 additions & 0 deletions settings/User.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"workbench.colorTheme": "Default Dark+",
"security.workspace.trust.enabled": false,
"security.workspace.trust.startupPrompt": "never",
"terminal.integrated.inheritEnv": false,
"python.linting.flake8Enabled": true,
"python.testing.pytestEnabled": true
}