Git Product home page Git Product logo

milady-docker's Introduction

MILADY Docker

User guide

Milady users can run the code without compilation thanks to the pre-built image we provide. Depending on your environment (workstation, cluster, supercomputer), you will have to rely on different tools for running the image:

  • Docker Engine (on workstations)
  • Singularity (on shared resources, for rootless execution)
  • pcocc (CEA alternative to Singularity, available on TGCC resources)

Locally, using Docker

You can pull and run the pre-built image using the following commands:

  1. Pull the image from Docker Hub:
docker pull aallera/milady:latest 
  1. Run the container with the current directory mounted as a volume (of course without compiling the code):
docker run -it --rm -v "$(pwd):/workspace" aallera/milady

The option -it enables the interactive mode with a pseudo-TTY session, allowing to kill the process before it ends (ctrl-C).

Pass extra parameters to mpirun

Optionally, additional options to mpirun such as the number of processors (default is -np 4) can be passed as:

docker run -it --rm -v "$(pwd):/workspace" aallera/milady -np 8

Run an interactive shell in the container

docker run -it --rm -v "$(pwd):/workspace" aallera/milady shell

On Irene Joliot-Curie (CEA-TGCC) using pcocc

Locally (takes a long time):

docker save milady:<tag> | gzip > milady_<tag>.tar.gz

On Irene (after transfering the created file):

gzip -d milady_latest.tar.gz
pcocc image import docker-archive:milady_latest.tar milady

Interactive use:

# (optional) ccc_mprun  -p skylake -m scratch,work -s
pcocc run --mount "$(pwd):/workspace" -s -I milady -- -np 16

Submit as a job:

#!/bin/bash
#MSUB -n 4
#MSUB -c 8
#MSUB -q skylake
#MSUB -T 600
#MSUB -A <your submission group>
pcocc run -n ${BRIDGE_MSUB_NPROC}  -I my_docker_image [arg1, ...]

On Jean-Zay (IDRIS) using Singularity

  1. Start a pre/post session to access a large RAM node (singularity build takes more ram than the standard 5 Go).
srun --pty --nodes=1 -A yxs@cpu --ntasks-per-node=1 --cpus-per-task=10 --partition=prepost --hint=nomultithread --time=01:00:00 bash
  1. Build singularity image (.sif)
singularity build milady.sif docker://aallera/milady:1.0.1
  1. Add to allowed directory
idrcontmgr cp milady.sif
  1. Start a shell, with access to $WORK. Other directories are read-only.
singularity shell $SINGULARITY_ALLOWED_DIR/milady.sif --bind $WORK/:/MLD/work

Developer: Build the Docker Image

Build the image

  1. Clone the current repository
  2. Clone the milady repository inside it
./clone_milady.sh
  1. Build the Docker image using the following command:
docker build -t milady .

This command will compile the MILADY code during the image build process.

Push the Docker Image to Docker Hub

  1. Create a free account on Docker Hub (https://hub.docker.com/) if you don’t have one already.
  2. Log in to your Docker Hub account on your machine using the following command:
docker login
  1. Tag your local image with your Docker Hub username and a custom name for the image:
docker tag milady YOUR_DOCKERHUB_USERNAME/milady:<tag>

Replace YOUR_DOCKERHUB_USERNAME with your actual Docker Hub username and <tag> with a version.

  1. Push the tagged image to Docker Hub:
docker push YOUR_DOCKERHUB_USERNAME/milady:<tag>

milady-docker's People

Contributors

arn-all avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.