forked from jupyter/docker-stacks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·98 lines (86 loc) · 2.6 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/env bash
IMAGE_NAME="jupyter-gpu"
VERSION="0.0.1"
UBUNTU_VERSION="22.04"
UBUNTU_NAME="jammy"
CONTAINER_USER="jupu"
# Construct useful var names
CONTAINER_HOME="/home/${CONTAINER_USER}"
DESIRED_PLATFORM="linux/amd64"
# Build Docker images
#rocm
LATEST="${IMAGE_NAME}:latest"
VERSION="0.0.1"
FULL_TAG="${IMAGE_NAME}:${VERSION}"
docker build \
--progress=plain \
-t "${FULL_TAG}" rocm \
--platform="${DESIRED_PLATFORM}" \
--build-arg ROOT_CONTAINER="ubuntu:${UBUNTU_VERSION}" \
--build-arg UBUNTU_NAME="${UBUNTU_NAME}"
docker tag "${FULL_TAG}" "${LATEST}"
# Echo the built image tag
echo "Built image: ${FULL_TAG} for rocm"
#jupyter-init
VERSION="0.0.2"
LAST_TAG=${FULL_TAG}
FULL_TAG="${IMAGE_NAME}:${VERSION}"
docker build \
--progress=plain \
-t "${FULL_TAG}" docker-stacks-foundation \
--platform="${DESIRED_PLATFORM}" \
--build-arg ROOT_CONTAINER=${LAST_TAG} \
--build-arg NB_USER="${CONTAINER_USER}"
docker tag "${FULL_TAG}" "${LATEST}"
# Echo the built image tag
echo "Built image: ${FULL_TAG} for jupyter-init"
VERSION="0.0.3"
LAST_TAG=${FULL_TAG}
FULL_TAG="${IMAGE_NAME}:${VERSION}"
#jupyter-base
docker build \
--progress=plain \
-t "${FULL_TAG}" base-notebook \
--build-arg ROOT_CONTAINER=${LAST_TAG} \
--platform="${DESIRED_PLATFORM}"
docker tag "${FULL_TAG}" "${LATEST}"
# Echo the built image tag
echo "Built image: ${FULL_TAG} for base-notebook"
VERSION="0.0.4"
LAST_TAG=${FULL_TAG}
FULL_TAG="${IMAGE_NAME}:${VERSION}"
#jupyter-minimal
docker build \
--progress=plain \
-t "${FULL_TAG}" minimal-notebook \
--build-arg ROOT_CONTAINER=${LAST_TAG} \
--platform="${DESIRED_PLATFORM}"
docker tag "${FULL_TAG}" "${LATEST}"
# Echo the built image tag
echo "Built image: ${FULL_TAG} for minimal-notebook"
VERSION="0.0.5"
LAST_TAG=${FULL_TAG}
FULL_TAG="${IMAGE_NAME}:${VERSION}"
#jupyter-scipy
docker build \
--progress=plain \
-t "${FULL_TAG}" scipy-notebook \
--build-arg ROOT_CONTAINER=${LAST_TAG} \
--platform="${DESIRED_PLATFORM}"
docker tag "${FULL_TAG}" "${LATEST}"
# Echo the built image tag
echo "Built image: ${FULL_TAG} for scipy-notebook"
VERSION="0.0.6"
LAST_TAG=${FULL_TAG}
FULL_TAG="${IMAGE_NAME}:${VERSION}"
#jupyter-scipy
docker build \
--progress=plain \
-t "${FULL_TAG}" datascience-notebook \
--build-arg ROOT_CONTAINER=${LAST_TAG} \
--platform="${DESIRED_PLATFORM}"
docker tag "${FULL_TAG}" "${LATEST}"
# Echo the built image tag
echo "Built image: ${FULL_TAG} for scipy-notebook"
#finish
echo "FINISHED! Built image: ${FULL_TAG}"