-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 858 Bytes
/
Dockerfile
File metadata and controls
35 lines (27 loc) · 858 Bytes
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
# Start from Python 3.10 slim image
FROM python:3.10-slim
# Set environment variables
ENV USER user
ENV HOME /home/user
ENV VENV_PATH /home/user/venv
# Install required system packages
RUN apt-get update --fix-missing && \
apt-get install -y wget bzip2 \
libglib2.0-0 libxext6 libsm6 libxrender1 \
build-essential git vim nano screen \
libopenmpi-dev redis-server
# Add user
RUN adduser ${USER} --disabled-password --gecos "" && \
mkdir -p ${HOME}
# Switch to user
USER ${USER}
WORKDIR ${HOME}
# Create a virtual environment
RUN python3 -m venv ${VENV_PATH}
ENV PATH="${VENV_PATH}/bin:$PATH"
# Install Python packages
RUN pip install jupyter numpy
RUN pip install mpi4py
# Clone and install dispel4py from the specific Git repository
RUN git clone https://github.com/StreamingFlow/d4py.git
RUN cd d4py && python setup.py install