Skip to content

Commit b9e518c

Browse files
author
Alec Thomson
committed
Add openmpi
1 parent 9ac8af0 commit b9e518c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Dockerfile-ompi

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
# The installer requires curl (and certificates) to download the release archive
4+
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates git openmpi-bin libopenmpi-dev openmpi-common
5+
6+
# Download the latest installer
7+
ADD https://astral.sh/uv/install.sh /uv-installer.sh
8+
9+
# Run the installer then remove it
10+
RUN sh /uv-installer.sh && rm /uv-installer.sh
11+
12+
# Ensure the installed binary is on the `PATH`
13+
ENV PATH="/root/.local/bin/:$PATH"
14+
# Deal with numba
15+
RUN mkdir -p /tmp/numba_cache & chmod 777 /tmp/numba_cache & NUMBA_CACHE_DIR=/tmp/numba_cache
16+
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
17+
18+
19+
# Install package
20+
# Copy your source code into the image
21+
ADD . /app
22+
WORKDIR /app
23+
RUN uv pip install --system .[mpi]
24+
25+
# Check install was successful
26+
RUN beamcon_3D -h
27+
CMD ["bash"]

0 commit comments

Comments
 (0)