From 410d7ac8e100d450aca46e84e6b2bd1a538a3cda Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 28 Nov 2023 21:31:49 +0000 Subject: [PATCH] safer directory switching --- jupyterhub/Dockerfile | 2 +- jupyterhub/build_docker_stacks.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/jupyterhub/Dockerfile b/jupyterhub/Dockerfile index 761c4085..d06168d3 100644 --- a/jupyterhub/Dockerfile +++ b/jupyterhub/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG BASE_CONTAINER=nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04 -FROM ${BASE_IMAGE} as base +FROM ${BASE_CONTAINER} as base # Make sure the image has the same libraries as the standard SIRF docker image # Add to the docker image the appropriate stuff diff --git a/jupyterhub/build_docker_stacks.sh b/jupyterhub/build_docker_stacks.sh index 2e0be393..de278b86 100755 --- a/jupyterhub/build_docker_stacks.sh +++ b/jupyterhub/build_docker_stacks.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash set -exuo pipefail +pushd "$(dirname "${BASH_SOURCE[0]}")" git submodule update --init --recursive -pushd $(dirname "$0")/docker-stacks/images/docker-stacks-foundation +cd docker-stacks/images/docker-stacks-foundation docker build --build-arg PYTHON_VERSION=3.9 --build-arg BASE_CONTAINER=nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu22.04 -t synerbi/jupyter:foundation . cd ../base-notebook @@ -12,13 +13,13 @@ docker build --build-arg BASE_CONTAINER=synerbi/jupyter:foundation -t synerbi/ju cd ../minimal-notebook docker build --build-arg BASE_CONTAINER=synerbi/jupyter:base -t synerbi/jupyter:minimal . - cd ../scipy-notebook docker build --build-arg BASE_CONTAINER=synerbi/jupyter:minimal -t synerbi/jupyter:scipy . cd ../datascience-notebook docker build --build-arg BASE_CONTAINER=synerbi/jupyter:scipy -t synerbi/jupyter:datascience . -popd - +cd ../../../.. docker build --build-arg BASE_CONTAINER=synerbi/jupyter:datascience -t synerbi/jupyter:sirf -f jupyterhub/Dockerfile . + +popd