From 70fcca36244ee342e202c8e2d604f87396ee6a34 Mon Sep 17 00:00:00 2001 From: James McDuffie Date: Fri, 16 Feb 2024 12:47:56 -0800 Subject: [PATCH] Introduce a common set of files to be copied into the built image that initally will be used for Jupyterhub user initialization. --- .env | 2 +- .github/workflows/build-stacks.yml | 4 +++- common/unity-sds/jupyter_skel/.condarc | 2 ++ docker-compose.yml | 2 +- unity_datascience/Dockerfile | 3 +++ 5 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 common/unity-sds/jupyter_skel/.condarc diff --git a/.env b/.env index 10cc1d4..7f6c1cd 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ DOCKER_GROUP=unity-sds -DOCKER_TAG=v0.2.2 +DOCKER_TAG=v0.2.3 diff --git a/.github/workflows/build-stacks.yml b/.github/workflows/build-stacks.yml index ee5b998..ac58f5c 100644 --- a/.github/workflows/build-stacks.yml +++ b/.github/workflows/build-stacks.yml @@ -38,6 +38,8 @@ jobs: # Note that sounder_sips_dev is left out because it takes a large amount of resources to run # # In the filters below, the key should be the same as the directory name of the Stack + # Additionally, the Dockerfile in the stack directory should work from the root context + # to allow inclusion of common files filters: | unity_datascience: - 'unity_datascience/**' @@ -114,7 +116,7 @@ jobs: id: build-and-push uses: docker/build-push-action@v5 with: - context: ${{ matrix.stack }} + file: ${{ matrix.stack }}/Dockerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/common/unity-sds/jupyter_skel/.condarc b/common/unity-sds/jupyter_skel/.condarc new file mode 100644 index 0000000..513a5f6 --- /dev/null +++ b/common/unity-sds/jupyter_skel/.condarc @@ -0,0 +1,2 @@ +envs_dirs: + - /home/jovyan/conda-envs/ diff --git a/docker-compose.yml b/docker-compose.yml index caf18d2..cc4f72e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,5 +11,5 @@ services: image: ${DOCKER_GROUP}/datascience:${DOCKER_TAG} hostname: local build: - context: unity_datascience + context: ./ dockerfile: $PWD/unity_datascience/Dockerfile diff --git a/unity_datascience/Dockerfile b/unity_datascience/Dockerfile index 3e9e21c..2e844f7 100644 --- a/unity_datascience/Dockerfile +++ b/unity_datascience/Dockerfile @@ -3,6 +3,9 @@ FROM jupyter/datascience-notebook # Switch to root user for build USER root +# Requires the build context to be one level up where common is located +COPY common/unity-sds /etc/unity-sds + # Install Dockstore RUN apt-get update -q && \ apt install -y openjdk-11-jdk && \