-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.catalyticfoam
51 lines (35 loc) · 1014 Bytes
/
Dockerfile.catalyticfoam
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
ARG WRAPPER_TAG
ARG BASE_IMAGE
FROM ${BASE_IMAGE}:${WRAPPER_TAG} AS base
ARG SLURM_VERSION
USER root
RUN apt update
RUN pip install --upgrade pip
WORKDIR /tmp
RUN if [ "$INSTALL_SLURM" = "yes" ] ; \
then \
apt install -y munge && \
wget "https://download.schedmd.com/slurm/slurm-${SLURM_VERSION}.tar.bz2" && \
tar --bzip -x -f "slurm-${SLURM_VERSION}.tar.bz2" && \
cd "slurm-${SLURM_VERSION}" && \
./configure && \
make && \
make install ; \
else \
echo 'Slurm will not be installed.' ; \
fi
WORKDIR /home/openfoam/fastapi-celery
COPY . ./
########################## development #############################
FROM base AS develop
USER root
RUN pip install .[tests,pre_commit]
WORKDIR /app
########################## production #############################
FROM base as production
ARG WRAPPER_DEPS
RUN chmod -R 0777 .
RUN chown -R openfoam:openfoam .
USER openfoam
RUN pip install .
ENTRYPOINT ["./docker_entrypoint.sh"]