|
1 | | -FROM archlinux:latest |
2 | | - |
3 | | -# Install packages/dependencies |
4 | | -RUN pacman-key --init |
5 | | -RUN pacman -Syyu --noconfirm |
6 | | -RUN pacman -S --noconfirm \ |
7 | | - base-devel coreutils \ |
8 | | - git ninja gcc-fortran \ |
9 | | - cmake openmpi python3 \ |
10 | | - python-pip openssh \ |
11 | | - python-virtualenv vim \ |
12 | | - wget tree |
13 | | - |
14 | | -# Generic (non-root) user because MPI dislikes running as root. |
15 | | -# This user is allowed to run "sudo" commands without a password. |
16 | | -RUN useradd --create-home --shell /bin/bash me |
17 | | -RUN passwd -d me |
18 | | -RUN echo "me ALL=(ALL:ALL) ALL" >> /etc/sudoers |
19 | | -USER me |
20 | | -WORKDIR /home/me |
21 | | - |
22 | | -# Env |
| 1 | +FROM ubuntu:jammy |
| 2 | +MAINTAINER Henry Le Berre < [email protected]> |
| 3 | + |
23 | 4 | ENV PS1='[\u@mfc] \e[1;32m\w\e[0m \$ ' |
24 | 5 | ENV CMAKE_GENERATOR=Ninja |
25 | 6 |
|
26 | | -# Bashrc |
27 | | -RUN echo $' \ |
28 | | -export PS1="[\u@mfc] \e[1;32m\w\e[0m \$ " \n\ |
29 | | -echo " " \n\ |
30 | | -echo " Welcome to the MFC Docker Environment!" \n\ |
31 | | -echo " " \n\ |
32 | | -if [ -d "/home/me/MFC" ]; then \n\ |
33 | | - echo " Please wait a few seconds while MFC configures directory permissions." \n\ |
34 | | - echo " > sudo chown -R me:me /home/me/MFC" \n\ |
35 | | - sudo chown -R me:me /home/me/MFC \n\ |
36 | | - echo " > Complete." \n\ |
37 | | - echo " Follow the README\'s instructions to get started with MFC." \n\ |
38 | | -else \n\ |
39 | | - echo " Error: The MFC mount isn\'t available." \n\ |
40 | | -fi \n\ |
41 | | -echo "" \n\ |
42 | | -cd /home/me/MFC \n\ |
43 | | -' >> /home/me/.bashrc |
44 | | - |
45 | | -# Run bash as the default command |
| 7 | +RUN apt update && apt upgrade -y |
| 8 | + |
| 9 | +RUN apt install -y git tar wget make cmake ninja-build gcc g++ \ |
| 10 | + python3 python3-dev python3-pip python3-venv \ |
| 11 | + 'openmpi-*' libopenmpi-dev sudo vim nano \ |
| 12 | + hdf5-tools |
| 13 | + |
| 14 | +RUN groupadd --gid 1000 me && \ |
| 15 | + useradd --uid 1000 --gid 1000 -m me |
| 16 | + |
| 17 | +RUN echo me ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/me && \ |
| 18 | + chmod 0440 /etc/sudoers.d/me |
| 19 | + |
| 20 | +USER me |
| 21 | + |
| 22 | +RUN pip3 install fypp rich pyyaml |
| 23 | + |
46 | 24 | CMD ["/bin/bash"] |
0 commit comments