From 4853f00c84519a7c681849d19bc91c87c3f115c9 Mon Sep 17 00:00:00 2001
From: Moritz Maxeiner <mm@ucw.sh>
Date: Tue, 1 Sep 2020 17:15:53 +0200
Subject: [PATCH] [jupyterhub] Add jupyterlab code formatting extension +
 black&isort

---
 jupyterhub/Dockerfile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/jupyterhub/Dockerfile b/jupyterhub/Dockerfile
index d937a4d..6fe73a7 100755
--- a/jupyterhub/Dockerfile
+++ b/jupyterhub/Dockerfile
@@ -32,7 +32,12 @@ RUN python${PYTHON_VERSION} -m pip --no-cache-dir install \
         jupyter-webrtc \
         ipyvolume \
         jupyter-threejs \
-        @axlair/jupyterlab_vim
+        @axlair/jupyterlab_vim \
+    && \
+    python${PYTHON_VERSION} -m jupyter labextension install @ryantam626/jupyterlab_code_formatter && \
+    python${PYTHON_VERSION} -m pip --no-cache-dir install jupyterlab_code_formatter && \
+    python${PYTHON_VERSION} -m jupyter serverextension enable --sys-prefix --py jupyterlab_code_formatter && \
+    python${PYTHON_VERSION} -m pip --no-cache-dir install black isort
 
 RUN mkdir -p ~/.venv && \
     python${PYTHON_VERSION} -m venv ~/.venv/robofish && \
@@ -42,6 +47,8 @@ RUN mkdir -p ~/.venv && \
     pip install tensorflow==1.15.3 && \
     pip --no-cache-dir install \
         wheel \
+        black \
+        isort \
         scipy \
         matplotlib \
         pandas \
-- 
GitLab