Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
dockerfiles: install our files under /source/ and refresh images
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 18 Sep 2018 12:40:21 +0000 (14:40 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 18 Sep 2018 12:42:42 +0000 (14:42 +0200)
docs/source/tuto_s4u.rst
docs/source/tuto_smpi.rst
tools/docker/Dockerfile.stable
tools/docker/Dockerfile.tuto-s4u
tools/docker/Dockerfile.tuto-smpi [new file with mode: 0644]
tools/docker/Dockerfile.unstable
tools/docker/Makefile

index 8acbbb2..5fc672c 100644 (file)
@@ -301,18 +301,18 @@ image. Once you `installed Docker itself
 .. code-block:: shell
 
    docker pull simgrid/tuto-s4u
 .. code-block:: shell
 
    docker pull simgrid/tuto-s4u
-   docker run -it --rm --name simgrid --volume ~/simgrid-tutorial:/src/tutorial simgrid/tuto-s4u bash
+   docker run -it --rm --name simgrid --volume ~/simgrid-tutorial:/source/tutorial simgrid/tuto-s4u bash
 
 This will start a new container with all you need to take this
 tutorial, and create a ``simgrid-tutorial`` directory in your home on
 
 This will start a new container with all you need to take this
 tutorial, and create a ``simgrid-tutorial`` directory in your home on
-your host machine that will be visible as ``/src/tutorial`` within the
+your host machine that will be visible as ``/source/tutorial`` within the
 container.  You can then edit the files you want with your favorite
 editor in ``~/simgrid-tutorial``, and compile them within the
 container to enjoy the provided dependencies.
 
 .. warning::
 
 container.  You can then edit the files you want with your favorite
 editor in ``~/simgrid-tutorial``, and compile them within the
 container to enjoy the provided dependencies.
 
 .. warning::
 
-   Any change to the container out of ``/src/tutorial`` will be lost
+   Any change to the container out of ``/source/tutorial`` will be lost
    when you log out of the container, so don't edit the other files!
 
 All needed dependencies are already installed in this container
    when you log out of the container, so don't edit the other files!
 
 All needed dependencies are already installed in this container
@@ -320,14 +320,14 @@ All needed dependencies are already installed in this container
 optional in this tutorial, it is not installed to reduce the image
 size.
 
 optional in this tutorial, it is not installed to reduce the image
 size.
 
-The code template is available under ``/src/simgrid-template-s4u`` in
+The code template is available under ``/source/simgrid-template-s4u`` in
 the image. You should copy it to your working directory when you first
 log in:
 
 .. code-block:: shell
 
 the image. You should copy it to your working directory when you first
 log in:
 
 .. code-block:: shell
 
-   cp -r /src/simgrid-template-s4u/* /src/tutorial
-   cd /src/tutorial
+   cp -r /source/simgrid-template-s4u/* /source/tutorial
+   cd /source/tutorial
 
 Using your Computer Natively
 ............................
 
 Using your Computer Natively
 ............................
index 3af0229..0584720 100644 (file)
@@ -246,33 +246,35 @@ image. Once you `installed Docker itself
 .. code-block:: shell
 
    docker pull simgrid/tuto-smpi
 .. code-block:: shell
 
    docker pull simgrid/tuto-smpi
-   docker run -it --rm --name simgrid --volume ~/smpi-tutorial:/src/tutorial simgrid/tuto-smpi bash
+   docker run -it --rm --name simgrid --volume ~/smpi-tutorial:/source/tutorial simgrid/tuto-smpi bash
 
 This will start a new container with all you need to take this
 tutorial, and create a ``smpi-tutorial`` directory in your home on
 
 This will start a new container with all you need to take this
 tutorial, and create a ``smpi-tutorial`` directory in your home on
-your host machine that will be visible as ``/src/tutorial`` within the
+your host machine that will be visible as ``/source/tutorial`` within the
 container.  You can then edit the files you want with your favorite
 editor in ``~/smpi-tutorial``, and compile them within the
 container to enjoy the provided dependencies.
 
 .. warning::
 
 container.  You can then edit the files you want with your favorite
 editor in ``~/smpi-tutorial``, and compile them within the
 container to enjoy the provided dependencies.
 
 .. warning::
 
-   Any change to the container out of ``/src/tutorial`` will be lost
+   Any change to the container out of ``/source/tutorial`` will be lost
    when you log out of the container, so don't edit the other files!
 
 All needed dependencies are already installed in this container
    when you log out of the container, so don't edit the other files!
 
 All needed dependencies are already installed in this container
-(SimGrid, a C/C++ compiler, a Fortran compiler, make, pajeng and
-R). Vite being only optional in this tutorial, it is not installed to
-reduce the image size.
+(SimGrid, the C/C++/Fortran compilers, make, pajeng and R). Vite being
+only optional in this tutorial, it is not installed to reduce the
+image size. 
 
 
-The code template is available under ``/src/simgrid-template-smpi`` in
-the image. You should copy it to your working directory when you first
-log in:
+The container also include the example platform files from the
+previous section as well as the source code of the NAS Parallel
+Benchmarks. These files are available under
+``/source/simgrid-template-smpi`` in the image. You should copy it to
+your working directory when you first log in:
 
 .. code-block:: shell
 
 
 .. code-block:: shell
 
-   cp -r /src/simgrid-template-smpi/* /src/tutorial
-   cd /src/tutorial
+   cp -r /source/simgrid-template-smpi/* /source/tutorial
+   cd /source/tutorial
 
 Using your Computer Natively
 ............................
 
 Using your Computer Natively
 ............................
index 3d35303..1b8cd23 100644 (file)
@@ -6,8 +6,8 @@ ARG DLURL
 # - Install SimGrid's dependencies
 # - Compile and install SimGrid itself
 RUN echo "DOWNLOAD_URL: ${DLURL}" && \
 # - Install SimGrid's dependencies
 # - Compile and install SimGrid itself
 RUN echo "DOWNLOAD_URL: ${DLURL}" && \
-    apt update && apt install -y wget && \
-    mkdir /src && cd /src && \
+    apt update && apt upgrade -y && apt install -y wget && \
+    mkdir /source && cd /source && \
     wget https://framagit.org/${DLURL} && \
     tar xf SimGrid-* && rm SimGrid-*tar.gz && \
     cd SimGrid-* && \
     wget https://framagit.org/${DLURL} && \
     tar xf SimGrid-* && rm SimGrid-*tar.gz && \
     cd SimGrid-* && \
index 777897c..305d0c3 100644 (file)
@@ -3,6 +3,6 @@ FROM simgrid/unstable
 
 # - Clone simgrid-template-s4u, as it is needed by the tutorial
 RUN apt install -y pajeng r-base r-cran-ggplot2 r-cran-dplyr cmake g++ git && \
 
 # - Clone simgrid-template-s4u, as it is needed by the tutorial
 RUN apt install -y pajeng r-base r-cran-ggplot2 r-cran-dplyr cmake g++ git && \
-    cd /src && \
+    cd /source && \
     git clone --depth=1 https://framagit.org/simgrid/simgrid-template-s4u.git simgrid-template-s4u.git && \
     apt autoremove -y && apt clean && apt autoclean
\ No newline at end of file
     git clone --depth=1 https://framagit.org/simgrid/simgrid-template-s4u.git simgrid-template-s4u.git && \
     apt autoremove -y && apt clean && apt autoclean
\ No newline at end of file
diff --git a/tools/docker/Dockerfile.tuto-smpi b/tools/docker/Dockerfile.tuto-smpi
new file mode 100644 (file)
index 0000000..546a7c5
--- /dev/null
@@ -0,0 +1,8 @@
+# Base image 
+FROM simgrid/unstable
+
+# - Clone simgrid-template-smpi, as it is needed by the tutorial
+RUN apt update && apt install -y pajeng r-base r-cran-ggplot2 r-cran-dplyr build-essential g++ gfortran git && \
+    cd /source && \
+    git clone --depth=1 https://framagit.org/simgrid/simgrid-template-smpi.git simgrid-template-smpi.git && \
+    apt autoremove -y && apt clean && apt autoclean
\ No newline at end of file
index 0262d91..6d32dfc 100644 (file)
@@ -4,9 +4,9 @@ FROM debian:testing
 # - Install SimGrid's dependencies 
 # - Compile and install SimGrid itself. Clean the tree.
 # - Remove everything that was installed, and re-install what's needed by the SimGrid libraries before the Gran Final Cleanup
 # - Install SimGrid's dependencies 
 # - Compile and install SimGrid itself. Clean the tree.
 # - Remove everything that was installed, and re-install what's needed by the SimGrid libraries before the Gran Final Cleanup
-RUN apt update && \
+RUN apt update && apt -y upgrade && \
     apt install -y g++ gcc git valgrind default-jdk gfortran libboost-dev libboost-all-dev cmake dpkg-dev && \
     apt install -y g++ gcc git valgrind default-jdk gfortran libboost-dev libboost-all-dev cmake dpkg-dev && \
-    mkdir /src/ && cd /src && git clone --depth=1 https://framagit.org/simgrid/simgrid.git simgrid.git && \
+    mkdir /source/ && cd /source && git clone --depth=1 https://framagit.org/simgrid/simgrid.git simgrid.git && \
     cd simgrid.git && \
     cmake -DCMAKE_INSTALL_PREFIX=/usr/ -Denable_documentation=OFF -Denable_java=ON -Denable_smpi=ON -Denable_compile_optimizations=ON . && \
     make -j4 install && \
     cd simgrid.git && \
     cmake -DCMAKE_INSTALL_PREFIX=/usr/ -Denable_documentation=OFF -Denable_java=ON -Denable_smpi=ON -Denable_compile_optimizations=ON . && \
     make -j4 install && \
index e189fc9..b82cfc7 100644 (file)
@@ -4,6 +4,7 @@ default:
        @echo "   make stable     -> build the latest stable version of SimGrid (with SMPI w/o MC)"
        @echo "   make unstable   -> build the git version of SimGrid (with SMPI, w/o MC)"
        @echo "   make tuto-s4u   -> build all what you need to take the S4U tutorial"
        @echo "   make stable     -> build the latest stable version of SimGrid (with SMPI w/o MC)"
        @echo "   make unstable   -> build the git version of SimGrid (with SMPI, w/o MC)"
        @echo "   make tuto-s4u   -> build all what you need to take the S4U tutorial"
+       @echo "   make tuto-smpi  -> build all what you need to take the SMPI tutorial"
        @echo "   make push       -> push all images to the cloud"
        @echo "All our images are based on debian:testing"
        @echo "Also possible: DOCKER_EXTRA=--no-cache make unstable"
        @echo "   make push       -> push all images to the cloud"
        @echo "All our images are based on debian:testing"
        @echo "Also possible: DOCKER_EXTRA=--no-cache make unstable"
@@ -33,15 +34,30 @@ build-deps:
                 $(DOCKER_EXTRA) \
                  . | tee > build-deps.log
 
                 $(DOCKER_EXTRA) \
                  . | tee > build-deps.log
 
+build-deps-stable:
+       docker build -f Dockerfile.build-deps-stable \
+                -t simgrid/build-deps-stable:latest \
+                 -t simgrid/build-deps-stable:$$(date --iso-8601) \
+                $(DOCKER_EXTRA) \
+                 . | tee > build-deps-stable.log
+
 tuto-s4u: 
        docker build -f Dockerfile.tuto-s4u \
                 -t simgrid/tuto-s4u:latest \
                  -t simgrid/tuto-s4u:$$(date --iso-8601) \
                 $(DOCKER_EXTRA) \
 tuto-s4u: 
        docker build -f Dockerfile.tuto-s4u \
                 -t simgrid/tuto-s4u:latest \
                  -t simgrid/tuto-s4u:$$(date --iso-8601) \
                 $(DOCKER_EXTRA) \
-                 . | tee > tuto.log
+                 . | tee > tuto-s4u.log
+
+tuto-smpi: 
+       docker build -f Dockerfile.tuto-smpi \
+                -t simgrid/tuto-smpi:latest \
+                 -t simgrid/tuto-smpi:$$(date --iso-8601) \
+                $(DOCKER_EXTRA) \
+                 . | tee > tuto-smpi.log
 
 push:
        docker push simgrid/build-deps
        docker push simgrid/stable
        docker push simgrid/unstable
        docker push simgrid/tuto-s4u
 
 push:
        docker push simgrid/build-deps
        docker push simgrid/stable
        docker push simgrid/unstable
        docker push simgrid/tuto-s4u
+       docker push simgrid/tuto-smpi