ARG IMAGE_NAME=nvidia/cuda
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04

# Install dependencies: cmake, python 3.6, wget
RUN apt-get update && apt-get install -y --no-install-recommends cmake python3 curl git

# Install conda
RUN curl https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh -o anaconda.sh && \
    bash anaconda.sh -b && rm anaconda.sh

# Set PATH to include conda
ENV PATH="/root/anaconda3/bin:${PATH}"

# Send conda env spec into container
COPY . /root/hpvm/

# Create conda env named hpvm based on spec
RUN conda env create -n hpvm -f /root/hpvm/hpvm/env.yaml