Skip to content

Instantly share code, notes, and snippets.

@jasonm
Created December 15, 2021 14:51
Show Gist options
  • Save jasonm/16d4f70626232a82451e2171dda82987 to your computer and use it in GitHub Desktop.
Save jasonm/16d4f70626232a82451e2171dda82987 to your computer and use it in GitHub Desktop.
lsp-rtc-repro
docker build -t lsp-repro .
docker run --rm -p 8888:8888 lsp-repro
FROM jupyter/base-notebook
USER root
# build tools
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
build-essential
# zmq
RUN apt-get -qq update && apt-get -qq install -y libzmq3-dev
# jupyterlab, lsp, python-lsp-server
RUN pip install 'jupyterlab>=3.0.0,<4.0.0a0' jupyterlab-lsp 'python-lsp-server[all]'
# Switch back to jovyan to avoid accidental container runs as root
RUN /usr/local/bin/fix-permissions "/home/${NB_USER}"
USER ${NB_UID}
# JS and TS kernels
RUN npm install --save-dev ijavascript
RUN ./node_modules/.bin/ijsinstall --install=local
RUN npm install itypescript
RUN ./node_modules/.bin/its install --install=local
# TS language server
RUN npm install typescript-language-server
# Run JupyterLab RTC
ENV JUPYTER_ENABLE_LAB=yes
CMD ["/usr/local/bin/start-notebook.sh", "--collaborative"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment