Skip to content

Latest commit

 

History

History
 
 

.docker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Flashlight and its dependencies can also be built with the provided Dockerfiles. Both CUDA and CPU backends are supported with Docker. The current Docker images are frozen at Ubuntu 18.04 and CUDA 10.0; we update these periodically.

Docker images on Docker Hub

Docker images for the CUDA and CPU backends for each Flashlight commit are available on Docker Hub.

Running Flashlight with Docker

  • Install Docker
  • If using the CUDA backend, install nvidia-docker
  • Run the given Dockerfile in a new container:
# if using the CUDA backend
sudo docker run --runtime=nvidia --rm -itd --ipc=host --name flashlight flml/flashlight:cuda-latest
# if using the CPU backend
sudo docker run --rm -itd --name flashlight flml/flashlight:cpu-latest
# start a terminal session inside the container
sudo docker exec -it flashlight bash

To run tests inside a container containing an already-built version of Flashlight:

cd /root/flashlight/build && make test

Building Docker Images from Source

Using the Dockerfiles in this directory:

git clone --recursive https://github.com/flashlight/flashlight.git
cd flashlight
# for CUDA backend
sudo docker build -f .docker/Dockerfile-CUDA -t flashlight .
# for CPU backend
sudo docker build -f .docker/Dockerfile-CPU -t flashlight .

Logging inside Docker Containers

To ensure logs are displayed, using the --logtostderr=1 and --minloglevel=0 flags is best-practice.