-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.Dockerfile
49 lines (32 loc) · 1.43 KB
/
user.Dockerfile
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
FROM jupyter/scipy-notebook:python-3.10
LABEL org.opencontainers.image.source="https://github.com/NVSL/cfiddle-cluster" \
org.opencontainers.image.title="cfiddle-slurm-cluster-usernode" \
org.opencontainers.image.description="Example user image to communicate with a slurm cluster for running cfiddle experiments" \
maintainer="Steven Swanson <swanson@cs.ucsd.edu>"
USER root
RUN apt-get update --fix-missing
RUN apt-get install -y host iputils-ping sudo gosu git sudo && apt-get clean
RUN mkdir /slurm
WORKDIR /slurm
COPY ./config.sh ./
COPY ./slurm.conf ./
COPY ./install_slurm.sh ./
RUN ( . ./config.sh; env; ./install_slurm.sh --client-only )
RUN groupadd -r cfiddle
RUN useradd -r -g cfiddle cfiddle
COPY ./cfiddle ./cfiddle
COPY ./delegate-function ./delegate-function
COPY ./install_cfiddle.sh ./
RUN ( . ./config.sh; ./install_cfiddle.sh )
COPY ./usertools ./usertools
RUN (. ./config.sh; cd usertools; [ -e ./install_usertools.sh ] && ./install_usertools.sh)
COPY ./run_jobs_and_watch.sh ./
COPY ./test_cfiddle.py ./
COPY usernode-entrypoint.sh /usr/local/bin/usernode-entrypoint.sh
COPY user-entrypoint.sh /usr/local/bin/user-entrypoint.sh
RUN chmod a+x /usr/local/bin/user-entrypoint.sh /usr/local/bin/usernode-entrypoint.sh
HEALTHCHECK NONE
RUN mkdir -p /cfiddle_scratch
RUN chmod a+rwx /cfiddle_scratch
ENTRYPOINT ["/usr/local/bin/usernode-entrypoint.sh"]
CMD ["start-notebook.sh", "--NotebookApp.token='slurmify'" ]