Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1.72 KB

README.md

File metadata and controls

41 lines (26 loc) · 1.72 KB

Building and Running MCF with Docker

Dependencies

Building Docker Image

  • The Docker image should be built once initially and then re-built every time the Dockerfile is modified.

  • (Option 1) Without CUDA support):

    docker build -t <docker_image_name> -f docker/without_cuda/Dockerfile .
    
  • (Option 2) With CUDA support:

    docker build -t <cuda_docker_image_name> -f docker/with_cuda/Dockerfile .
    
<docker_image_name> and <cuda_docker_image_name> are the names of the generated docker images, which can be named 
anything. The same name will be used in the `run` command below. 

Running Docker Container

  • Run the docker container in an interactive bash terminal.

    • (Option 1) Without CUDA support):

      docker run -it --ipc="host" --user $(id -u):$(id -g) -v /path/to/mcf:/home/mcf -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro <docker_image_name> bash
      
    • (Option 2) With CUDA support:

      nvidia-docker run -it --ipc="host" --user $(id -u):$(id -g) -v /path/to/mcf:/home/mcf -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro <cuda_docker_image_name> bash
      
    The `"-v /path/to/mcf:/home/mcf"` command will mount the MCF repository within the docker container. So all 
    changes made to `/home/mcf/*` inside the docker container will be reflected in `/path/to/mcf/*` outside the docker
    container.
    
  • Follow the instructions in GETTING_STARTED.md to build MCF within the docker container.