From 6313a71add6dcb97daaf06f7a56abc0316094fa2 Mon Sep 17 00:00:00 2001 From: Ravi Kotecha Date: Fri, 21 Dec 2018 10:37:03 +0000 Subject: [PATCH] Fix Conda permissions The base image does a chown -R on /opt/conda for the default uid 1000 but since we run as UID 1001 we need to re-chown the conda directory. Conda is broken at the moment so users aren't using it, but once this is turned on `conda install` will install packages to `/opt/conda/pkgs/` which will get wiped on reboot so maybe we need to do something similar to the pipcorn alias that makes packages install to ~/local/ --- all-spark-notebook/Dockerfile | 2 ++ datascience-notebook/Dockerfile | 3 +++ 2 files changed, 5 insertions(+) diff --git a/all-spark-notebook/Dockerfile b/all-spark-notebook/Dockerfile index 7990681..afa51d0 100644 --- a/all-spark-notebook/Dockerfile +++ b/all-spark-notebook/Dockerfile @@ -18,3 +18,5 @@ RUN conda install boto3 \ && pip install git+https://github.com/moj-analytical-services/gluejobutils/#egg=gluejobutils \ && mv /tmp/hdfs-site.xml /usr/local/spark/conf \ && apt-get update && apt-get install -y $(cat /tmp/apt_packages) + +RUN chown -R $NB_UID /opt/conda diff --git a/datascience-notebook/Dockerfile b/datascience-notebook/Dockerfile index d882752..3236c87 100644 --- a/datascience-notebook/Dockerfile +++ b/datascience-notebook/Dockerfile @@ -12,3 +12,6 @@ COPY ./files/apt_packages /tmp/ RUN conda install boto3 \ && apt-get update && apt-get install -y $(cat /tmp/apt_packages) + +# Fix conda install for NB_UID +RUN chown -R $NB_UID /opt/conda