From 38e423896ddd5f7b903180936aafb36a9cf9c6ce Mon Sep 17 00:00:00 2001 From: Lucas Vieira Date: Tue, 17 Sep 2024 14:51:48 -0300 Subject: [PATCH] Fix pip install (#85) * fix: not having jupyter venv in PATH * fix: jupyteruser not owning its venv directory --- docker/Dockerfile | 1 + docker/setup/jupyter.py | 1 + 2 files changed, 2 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7f5d09a..5cfe18e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -125,6 +125,7 @@ RUN groupadd -r briefer \ && useradd -r -g jupyteruser jupyteruser \ && mkdir -p /home/jupyteruser \ && chown -R jupyteruser:jupyteruser /home/jupyteruser \ + && chown -R jupyteruser:jupyteruser /app/jupyter/venv \ && chmod 700 /home/jupyteruser diff --git a/docker/setup/jupyter.py b/docker/setup/jupyter.py index 1568daf..f11907c 100644 --- a/docker/setup/jupyter.py +++ b/docker/setup/jupyter.py @@ -27,6 +27,7 @@ def get_config(): def run_jupyter(cfg): env = os.environ.copy() env["JUPYTER_TOKEN"] = cfg["JUPYTER_TOKEN"] + env["PATH"] = "/app/jupyter/venv/bin:" + env.get("PATH", "") jupyter = subprocess.run([ "/app/jupyter/venv/bin/jupyter",