Skip to content

Commit 7e3d2a5

Browse files
committed
Add custom installation of pyspng for arm
1 parent 07b4041 commit 7e3d2a5

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

Dockerfile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,25 @@ RUN apt-get update && \
2929

3030
ENV _CUDA_COMPAT_TIMEOUT=90
3131

32-
# Install other dependencies
33-
RUN pip install --no-cache-dir "h5py>=3.7.0" "netcdf4>=1.6.3" "ruamel.yaml>=0.17.22" "scikit-learn>=1.0.2" "cftime>=1.6.2" "einops>=0.7.0" "pyspng>=0.1.0"
34-
RUN pip install --no-cache-dir "hydra-core>=1.2.0" "termcolor>=2.1.1" "wandb>=0.13.7" "pydantic>=1.10.2" "imageio>=2.28.1" "moviepy>=1.0.3" "tqdm>=4.60.0" "gcsfs==2024.2.0"
35-
3632
# copy physicsnemo source
3733
COPY . /physicsnemo/
3834

35+
# Install pyspng for arm64
36+
ARG PYSPNG_ARM64_WHEEL
37+
ENV PYSPNG_ARM64_WHEEL=${PYSPNG_ARM64_WHEEL:-unknown}
38+
39+
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] && [ "$PYSPNG_ARM64_WHEEL" != "unknown" ]; then \
40+
echo "Custom pyspng wheel for $TARGETPLATFORM exists, installing!" && \
41+
pip install --no-cache-dir /physicsnemo/deps/${PYSPNG_ARM64_WHEEL}; \
42+
else \
43+
echo "No custom wheel for pyspng found. Installing pyspng for: $TARGETPLATFORM from pypi" && \
44+
pip install --no-cache-dir "pyspng>=0.1.0"; \
45+
fi
46+
47+
# Install other dependencies
48+
RUN pip install --no-cache-dir "h5py>=3.7.0" "netcdf4>=1.6.3" "ruamel.yaml>=0.17.22" "scikit-learn>=1.0.2" "cftime>=1.6.2" "einops>=0.7.0"
49+
RUN pip install --no-cache-dir "hydra-core>=1.2.0" "termcolor>=2.1.1" "wandb>=0.13.7" "pydantic>=1.10.2" "imageio>=2.28.1" "moviepy>=1.0.3" "tqdm>=4.60.0" "gcsfs==2024.2.0"
50+
3951
# Install Numcodecs (This needs a separate install because Numcodecs ARM pip install has issues)
4052
# A fix is being added here: https://github.com/zarr-developers/numcodecs/pull/315 but the public release is not ready yet.
4153
ARG NUMCODECS_ARM64_WHEEL

0 commit comments

Comments
 (0)