Skip to content

Commit e3c6e84

Browse files
committed
update dockerfile
1 parent 8da4b0f commit e3c6e84

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

2023-01/smartsim/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,26 @@ USER root
99
RUN apt update && apt install -y python3-dev python3-pip git-core git-lfs cmake unzip vim wget
1010
RUN apt clean && apt autoremove --yes && rm -rf /var/lib/{cache,log}/
1111

12+
USER openfoam
13+
1214
# Software versions; overriding these has no effect on resulting containers; but nice to have
1315
# as environment variables to remove version confusion
1416
ENV SMARTREDIS_VERSION="6bfcf1deb0d726df75610fe8a352b9ecb13c44f7"
1517
ENV SMARTSIM_VERSION="0.5.1"
1618

1719
# Install SmartSim (maybe get the development version for this too?)
18-
RUN pip install smartsim[ml]==$SMARTSIM_VERSION
19-
20-
USER openfoam
20+
RUN pip3 install -U smartsim[ml]==$SMARTSIM_VERSION
21+
ENV PATH=$PATH:/home/openfoam/.local/bin
2122

2223
# Build SmartRedis
2324
ENV FOAM_SMARTREDIS=$HOME/smartredis
2425
RUN git clone https://github.com/CrayLabs/SmartRedis $FOAM_SMARTREDIS &&\
2526
cd $FOAM_SMARTREDIS && git reset --hard $SMARTREDIS_VERSION
26-
RUN cd $FOAM_SMARTREDIS && sudo smart clobber && sudo smart build --device=cpu && make lib
27+
RUN cd $FOAM_SMARTREDIS && smart clobber && smart build --device=cpu && make lib
2728

2829
# Environment variables to use for linking SmartRedis libs to OpenFOAM bins/libs
2930
ENV SMARTREDIS_INCLUDE=$FOAM_SMARTREDIS/install/include
3031
ENV SMARTREDIS_LIB=$FOAM_SMARTREDIS/install/lib
3132
ENV LD_LIBRARY_PATH=$SMARTREDIS_LIB:$LD_LIBRARY_PATH
3233
RUN find /usr/lib/openfoam -iname DiagonalMatrix.H -exec sudo sed -i 's/DiagonalMatrix<Type>/DiagonalMatrix/g' {} \;
33-
WORKDIR $HOME
34+
RUN sudo chmod 777 -R /home/openfoam/data

0 commit comments

Comments
 (0)