diff --git a/docker/Dockerfile b/docker/Dockerfile index 263525da2..2ed6f2e36 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,10 +7,18 @@ RUN apt-get -y update # Get "essential" tools and libraries RUN apt-get -y install build-essential \ - && apt-get -y install cmake curl git file gfortran-12 ksh m4 python3 tcsh time wget vim \ + && apt-get -y install cmake cmake-curses-gui curl git file gfortran-12 ksh m4 python3 tcsh time wget vim \ && apt-get -y install libnetcdf-pnetcdf-19 libnetcdff7 libnetcdf-dev libnetcdff-dev libxml2 \ && apt-get -y install python3-pip python3.11-venv RUN apt-get -y install openmpi-bin libopenmpi-dev +RUN apt-get -y install emacs-nox + +# Set up python virtual environment and install needed packages +ENV VIRTUAL_ENV=/home/venv +RUN python3 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" +RUN . $VIRTUAL_ENV/bin/activate && pip3 install f90nml netcdf4 +RUN ln -s /usr/bin/python3 /usr/bin/python #Compiler environment variables ENV CC=/usr/bin/gcc @@ -31,9 +39,6 @@ RUN groupadd comusers -g 9999 \ && chown -R comuser:comusers /comsoftware \ && chmod -R 6755 /comsoftware -# Link version-specific aliases (python3 will be created later with virtual environment) -RUN ln -s ~comuser/.venv/bin/python3 /usr/local/bin/python - # all root steps completed above, now continue below as regular userID comuser USER comuser WORKDIR /home @@ -46,21 +51,21 @@ RUN mkdir -p $NCEPLIBS_DIR/src && cd $NCEPLIBS_DIR/src \ && git clone -b v2.4.1 --recursive https://github.com/NOAA-EMC/NCEPLIBS-bacio \ && mkdir NCEPLIBS-bacio/build && cd NCEPLIBS-bacio/build \ && cmake -DCMAKE_INSTALL_PREFIX=$NCEPLIBS_DIR .. \ - && make VERBOSE=1 \ + && make VERBOSE=1 -j \ && make install RUN cd $NCEPLIBS_DIR/src \ && git clone -b v2.3.3 --recursive https://github.com/NOAA-EMC/NCEPLIBS-sp \ && mkdir NCEPLIBS-sp/build && cd NCEPLIBS-sp/build \ && cmake -DCMAKE_INSTALL_PREFIX=$NCEPLIBS_DIR .. \ - && make VERBOSE=1 \ + && make VERBOSE=1 -j \ && make install RUN cd $NCEPLIBS_DIR/src \ && git clone -b v2.11.0 --recursive https://github.com/NOAA-EMC/NCEPLIBS-w3emc \ && mkdir NCEPLIBS-w3emc/build && cd NCEPLIBS-w3emc/build \ && cmake -DCMAKE_INSTALL_PREFIX=$NCEPLIBS_DIR .. \ - && make VERBOSE=1 \ + && make VERBOSE=1 -j \ && make install ENV bacio_ROOT=/comsoftware/nceplibs @@ -71,15 +76,15 @@ ENV w3emc_ROOT=/comsoftware/nceplibs RUN cd /comsoftware \ && git clone --recursive -b main https://github.com/NCAR/ccpp-scm +RUN cd /comsoftware/ccpp-scm/scm \ + && mkdir bin \ + && cd bin +RUN cd /comsoftware/ccpp-scm/scm/bin \ + && cmake ../src \ + && make -j RUN cd /comsoftware/ccpp-scm/ \ && ./contrib/get_all_static_data.sh \ && ./contrib/get_thompson_tables.sh -# RUN cd /comsoftware/ccpp-scm/scm \ -# && mkdir bin \ -# && cd bin -# RUN cd /comsoftware/ccpp-scm/scm/bin \ -# && cmake ../src \ -# && make -j4 # The analysis scripts have options for using LaTeX when making figure labels. # If you would like to install LaTeK, uncomment the section below. @@ -96,9 +101,3 @@ ENV SCM_ROOT=/comsoftware/ccpp-scm/ # For interactive use, vim mouse settings are infuriating RUN echo "set mouse=" > ~/.vimrc - -# Set up python virtual environment and install needed packages -ENV VIRTUAL_ENV=~/.venv -RUN python3 -m venv $VIRTUAL_ENV -ENV PATH="$VIRTUAL_ENV/bin:$PATH" -RUN pip3 install f90nml==1.4.4 netcdf4==1.6.5