Skip to content

Commit

Permalink
set LSP to create virtual documents in jupyter's runtime directory (j…
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsailer authored and GitHub Enterprise committed Dec 10, 2021
1 parent b6b16e6 commit e54c787
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,15 @@ ENV PATH="${CONDA_DIR}/envs/${CONDA_ENV}/bin:${CONDA_DIR}/bin:${PATH}" \
# Add the user
RUN useradd -d ${APP_DIR} -m -s /bin/bash ${NB_USER}
RUN mkdir -p ${APP_SETTINGS_DIR}
RUN mkdir -p ${APP_DIR}/.jupyter
RUN chown -R ${NB_USER}:${NB_USER} /app
COPY --from=build --chown=${NB_USER}:${NB_USER} ${CONDA_DIR} ${CONDA_DIR}
COPY --chown=${NB_USER}:${NB_USER} deployment/config/condarc ${APP_DIR}/.condarc
COPY --chown=${NB_USER}:${NB_USER} deployment/config/npmrc ${APP_DIR}/.npmrc
COPY --chown=${NB_USER}:${NB_USER} deployment/config/yarnrc ${APP_DIR}/.yarnrc
COPY --chown=${NB_USER}:${NB_USER} deployment/config/gitconfig ${APP_DIR}/.gitconfig
COPY --chown=${NB_USER}:${NB_USER} deployment/config/overrides.json ${APP_SETTINGS_DIR}
COPY --chown=${NB_USER}:${NB_USER} deployment/config/jupyter_config.py ${APP_DIR}/.jupyter/jupyter_config.py
COPY --chown=${NB_USER}:${NB_USER} version ${APP_DIR}
COPY --chown=${NB_USER}:${NB_USER} deployment ${APP_DIR}

Expand Down
12 changes: 12 additions & 0 deletions deployment/config/jupyter_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""Use this file to configure Jupyter Server and its extensions
"""
import os

from jupyter_core.paths import jupyter_runtime_dir
from traitlets.config import get_config

c = get_config()

c.LanguageServerManager.virtual_documents_dir = os.path.join(
jupyter_runtime_dir(), ".virtual_documents"
)

0 comments on commit e54c787

Please sign in to comment.