forked from ynashed/larnd-sim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (28 loc) · 1.15 KB
/
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
FROM pytorch/pytorch:1.12.0-cuda11.3-cudnn8-devel
MAINTAINER Youssef Nashed "[email protected]"
ENV PYTHONUNBUFFERED=1
ARG SCRATCH_VOLUME=/scratch
ENV SCRATCH_VOLUME=/scratch
RUN echo creating ${SCRATCH_VOLUME} && mkdir -p ${SCRATCH_VOLUME}
VOLUME ${SCRATCH_VOLUME}
WORKDIR /work
ADD requirements.txt /work/requirements.txt
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git wget build-essential
RUN mkdir -p /tmp && wget -q --no-check-certificate -P /tmp https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.4.tar.bz2 && \
tar -x -f /tmp/openmpi-4.0.4.tar.bz2 -C /tmp -j && \
cd /tmp/openmpi-4.0.4 && ./configure --prefix=/usr/local/openmpi --disable-getpwuid \
--with-slurm --with-cuda && \
make -j4 && \
make -j4 install && \
rm -rf /tmp/openmpi-4.0.4.tar.bz2 /tmp/openmpi-4.0.4
ENV PATH=/usr/local/openmpi/bin:$PATH \
LD_LIBRARY_PATH=/usr/local/openmpi/lib:$LD_LIBRARY_PATH
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
ADD . /work
# ensure the script is executable
#RUN chmod +x scripts/run_module.sh
#
#ENTRYPOINT ["/bin/bash", "./scripts/run_module.sh"]