I have installed docker on a Windows Machine and want to use the GPU in a ubuntu docker container. What changes should I make to my dockerfile?

My Dockerfile is attached below:

# We will use Ubuntu for our image
FROM ubuntu:latest

# Updating Ubuntu packages
RUN apt-get update && yes|apt-get upgrade


# Anaconda installing
FROM continuumio/miniconda3
ADD environment.yml /tmp/environment.yml
RUN conda env create -f /tmp/environment.yml

# Pull the environment name out of the environment.yml
RUN echo "source activate $(head -1 /tmp/environment.yml | cut -d' ' -f2)" > ~/.bashrc
ENV PATH /opt/conda/envs/$(head -1 /tmp/environment.yml | cut -d' ' -f2)/bin:$PATH

RUN mkdir /home/notebooks
RUN cd /home/notebooks
RUN /bin/bash -c "source ~/.bashrc"
RUN /bin/bash -c "source activate segmed"

0 Answers