Skip to content

Commit a8d1ac3

Browse files
authored
Update Dockerfile
1 parent 174e680 commit a8d1ac3

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

dockerfiles/amd64/Dockerfile

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ FROM ithacafv/openfoam2506-muq2-pytorch
22
LABEL maintainer="[email protected]"
33

44

5-
# # add enviromental variables and enable the default user
6-
# ARG USER=ithacafv
7-
# ARG of_var="source /usr/lib/openfoam/openfoam2506/etc/bashrc"
5+
# add enviromental variables and enable the default user
6+
ARG USER=ithacafv
7+
ARG of_var="source /usr/lib/openfoam/openfoam2506/etc/bashrc"
88
ARG ithaca_var="source /usr/lib/ITHACA-FV/etc/bashrc"
99
# ENV USER=$USER
1010

1111
# # Create the user
12-
# RUN adduser --disabled-password --gecos '' $USER && \
13-
# adduser $USER sudo; echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
14-
# usermod -a -G $USER $USER && \
15-
# usermod -u 9999 ithacafv && \
16-
# groupmod -g 9999 ithacafv
12+
RUN adduser --disabled-password --gecos '' $USER && \
13+
adduser $USER sudo; echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
14+
usermod -a -G $USER $USER && \
15+
usermod -u 9999 ithacafv && \
16+
groupmod -g 9999 ithacafv
1717
# #make sure everything is in place
18-
# ENV HOME /home/$USER
19-
# RUN chown -R $USER:$USER /home/$USER
20-
# RUN chown -R $USER:$USER /home/openfoam && rm -r /home/openfoam && \
21-
# chown -R $USER:$USER /home/sudofoam && rm -r /home/sudofoam
18+
ENV HOME /home/$USER
19+
RUN chown -R $USER:$USER /home/$USER
20+
RUN chown -R $USER:$USER /home/openfoam && rm -r /home/openfoam && \
21+
chown -R $USER:$USER /home/sudofoam && rm -r /home/sudofoam
2222

23-
# USER root
23+
USER root
2424
RUN apt-get update &&\
2525
apt-get install -y \
2626
git \
@@ -33,28 +33,28 @@ RUN apt-get update &&\
3333

3434
WORKDIR /usr/lib
3535
RUN git clone https://github.com/ITHACA-FV/ITHACA-FV.git
36-
# RUN chown -R $USER:$USER openfoam ITHACA-FV
37-
# RUN chown -R $USER:$USER /home/$USER
38-
# RUN chown -R $USER:$USER /root/miniconda3/include
39-
# USER $USER
36+
RUN chown -R $USER:$USER openfoam ITHACA-FV
37+
RUN chown -R $USER:$USER /home/$USER
38+
RUN chown -R $USER:$USER /root/miniconda3/include
39+
USER $USER
4040

4141
RUN /bin/bash -c "source /usr/lib/openfoam/openfoam2506/etc/bashrc && \
4242
cd ITHACA-FV && git submodule update --init && source etc/bashrc && \
4343
./Allwmake -taumq -j 4";
4444

45-
# USER root
46-
# RUN cp -r /home/ithacafv/OpenFOAM/ithacafv-v2506/platforms/linux64GccDPInt32Opt/bin/* /bin/
47-
# RUN cp -r /home/ithacafv/OpenFOAM/ithacafv-v2506/platforms/linux64GccDPInt32Opt/lib/* /lib/
45+
USER root
46+
RUN cp -r /home/ithacafv/OpenFOAM/ithacafv-v2506/platforms/linux64GccDPInt32Opt/bin/* /bin/
47+
RUN cp -r /home/ithacafv/OpenFOAM/ithacafv-v2506/platforms/linux64GccDPInt32Opt/lib/* /lib/
4848

4949
#Update bashrc
50-
# RUN echo $of_var >> /etc/bash.bashrc
50+
RUN echo $of_var >> /etc/bash.bashrc
5151
RUN echo $ithaca_var >> /root/.bashrc
5252

5353
# #Source bashrc
54-
# USER $USER
55-
# RUN /bin/bash -c "source /etc/bash.bashrc"
54+
USER $USER
55+
RUN /bin/bash -c "source /etc/bash.bashrc"
5656

57-
# USER $USER
58-
# WORKDIR $HOME
59-
# ENTRYPOINT ["/bin/bash"]
57+
USER $USER
58+
WORKDIR $HOME
59+
ENTRYPOINT ["/bin/bash"]
6060

0 commit comments

Comments
 (0)