Skip to content

Commit e3c926b

Browse files
committed
jupyter setup
1 parent a65b2df commit e3c926b

File tree

5 files changed

+50
-2
lines changed

5 files changed

+50
-2
lines changed

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
VERSION ?= latest
1+
VERSION ?= 22.04
22

33
slurmdbd:
44
cd docker/slurmdbd && docker build -f Dockerfile --platform linux/amd64 -t ghcr.io/synpse-hq/slurmdbd:${VERSION} .
55

66
push-slurmdbd: slurmdbd
7-
docker push ghcr.io/synpse-hq/slurmdbd:${VERSION}
7+
docker push ghcr.io/synpse-hq/slurmdbd:${VERSION}
8+
9+
10+
jupyter:
11+
cd docker/jupyter && docker build -f Dockerfile --platform linux/amd64 -t ghcr.io/synpse-hq/slurm-jupyter:${VERSION} .
12+
13+
push-jupyter: jupyter
14+
docker push ghcr.io/synpse-hq/slurm-jupyter:${VERSION}

docker/jupyter/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM ubuntu:22.04
2+
3+
# RUN apt update -y && apt install munge -y && apt install vim -y && apt install build-essential -y && apt install git -y && apt-get install mariadb-server -y && apt install wget -y
4+
RUN apt update -y && apt install munge vim build-essential git wget -y
5+
6+
ARG DEBIAN_FRONTEND=noninteractive
7+
8+
RUN apt install slurm-client -y
9+
RUN apt install curl dirmngr apt-transport-https lsb-release ca-certificates -y
10+
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
11+
RUN apt install sudo -y && apt install python3.9 python3-pip -y && useradd -m admin -s /usr/bin/bash -d /home/admin && echo "admin:admin" | chpasswd && adduser admin sudo && echo "admin ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
12+
13+
RUN apt update -y && apt install nodejs -y && npm install -g configurable-http-proxy && pip3 install jupyterlab==2.1.2
14+
15+
COPY slurm.conf /etc/slurm-llnl/
16+
COPY cgroup.conf /etc/slurm-llnl/
17+
COPY docker-entrypoint.sh /etc/slurm-llnl/
18+
19+
WORKDIR /home/admin
20+
21+
EXPOSE 8888
22+
23+
ENV USER admin
24+
ENV SHELL bash
25+
26+
RUN apt install libopenmpi-dev -y && pip3 install mpi4py && pip3 install jupyterlab_slurm
27+
28+
ENTRYPOINT ["/etc/slurm-llnl/docker-entrypoint.sh"]

docker/jupyter/cgroup.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CgroupAutomount=yes
2+
CgroupReleaseAgentDir="/etc/slurm/cgroup"
3+
ConstrainCores=yes
4+
ConstrainDevices=yes
5+
ConstrainRAMSpace=yes
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
sudo systemctl start munge
4+
5+
jupyter lab --no-browser --allow-root --ip=0.0.0.0 --NotebookApp.token='' --NotebookApp.password=''
6+
7+
tail -f /dev/null

docker/jupyter/slurm.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#SET BY SYNPSE

0 commit comments

Comments
 (0)