├── README.md ├── LICENSE └── Dockerfile /README.md: -------------------------------------------------------------------------------- 1 | # modern-fortran-docker 2 | 3 | Dockerfile to build a modern-fortran Docker image. 4 | It's based off Ubuntu 23.10, which has several enhancements to the Linux kernel and supports 5 | GCC GFortran v13.2.0. 6 | 7 | This Dockerfile installs gfortran, OpenMPI, and OpenCoarrays for you. 8 | It will also git clone the modern-fortran projects. 9 | 10 | You will need Docker to be set up and running on your system. 11 | 12 | ## Build 13 | 14 | ``` 15 | docker build . -t modern-fortran:latest 16 | ``` 17 | 18 | If the build is successful, you'll be able to see your new image, for example: 19 | 20 | ``` 21 | docker images 22 | REPOSITORY TAG IMAGE ID CREATED SIZE 23 | modern-fortran latest 0e5c745c8928 6 minutes ago 546MB 24 | ``` 25 | 26 | ## Run 27 | 28 | ``` 29 | docker run -it modern-fortran:latest /bin/bash 30 | ``` 31 | 32 | ## Thanks 33 | 34 | * Maurizio Tomassi who provided the original Dockerfile 35 | * Joshua Norrid who updated the Dockerfile for use with Ubuntu 23.10 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Milan Curcic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:23.10 2 | 3 | ENV USERNAME=backus 4 | 5 | # install sudo 6 | RUN apt-get -yq update && apt-get -yq install sudo 7 | 8 | # create and switch to a user 9 | RUN echo "backus ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers 10 | RUN useradd --no-log-init --home-dir /home/$USERNAME --create-home --shell /bin/bash $USERNAME 11 | RUN usermod -aG sudo $USERNAME 12 | #RUN adduser $USERNAME sudo 13 | USER $USERNAME 14 | WORKDIR /home/$USERNAME 15 | 16 | # install packages 17 | RUN sudo apt-get install -yq git curl && \ 18 | sudo apt-get install --no-install-recommends -yq make cmake gfortran libcoarrays-dev libopenmpi-dev libcoarrays-openmpi-dev libcaf-openmpi-3&& \ 19 | sudo apt-get clean -q 20 | 21 | # get modern-fortran code 22 | RUN git clone https://github.com/modern-fortran/tsunami 23 | RUN git clone https://github.com/modern-fortran/stock-prices 24 | RUN git clone https://github.com/modern-fortran/weather-buoys 25 | RUN git clone https://github.com/modern-fortran/generic-procedures 26 | RUN git clone https://github.com/modern-fortran/countdown 27 | RUN git clone https://github.com/modern-fortran/tcp-client-server 28 | RUN git clone https://github.com/modern-fortran/listings 29 | 30 | # extras 31 | RUN git clone https://github.com/modern-fortran/neural-fortran 32 | RUN git clone https://github.com/wavebitscientific/datetime-fortran 33 | RUN git clone https://github.com/wavebitscientific/functional-fortran 34 | --------------------------------------------------------------------------------