Skip to content

Commit 657fd60

Browse files
committedDec 1, 2023
remove geant4 data from Dockerfile
1 parent 0056ff8 commit 657fd60

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ build
33
*-build-*
44
*_cache
55
.github
6+
tests
7+
.*

‎Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ RUN curl -o miniconda_installer.sh https://repo.anaconda.com/miniconda/Miniconda
2222
# Install conda packages (geant4 is not available for aarch64 at the time of writing)
2323
RUN mamba install -y -c conda-forge \
2424
cmake geant4 \
25+
# remove data package to reduce image size (we should not install them in the first place, how?)
26+
# && mamba remove -y $(mamba list | grep 'geant4-data' | awk '{print $1}') \
27+
&& rm -rf /opt/conda/share/Geant4/data/* \
28+
&& mamba remove -y $(mamba list | grep 'geant4-data' | awk '{print $1}') \
2529
&& mamba clean -ya
2630

2731
# Copy files
@@ -30,8 +34,6 @@ COPY . /source
3034
# Build and install
3135
RUN cd source && python -m pip install .
3236

33-
# ENV PYTHONPATH=/opt/conda/lib:${PYTHONPATH}
34-
3537
RUN echo "#!/bin/bash\nexec /opt/conda/bin/conda run --no-capture-output -n base /opt/conda/bin/python \"\$@\"" > /usr/local/bin/entrypoint.sh \
3638
&& chmod +x /usr/local/bin/entrypoint.sh
3739

0 commit comments

Comments
 (0)