Skip to content

Instantly share code, notes, and snippets.

@Cerebrock
Created September 30, 2018 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cerebrock/eef5d33ece1782d3efdf0b35d29fb48e to your computer and use it in GitHub Desktop.
Save Cerebrock/eef5d33ece1782d3efdf0b35d29fb48e to your computer and use it in GitHub Desktop.
FROM nvcr.io/nvidia/cuda:9.2-devel
# Install Python 3.6.
RUN echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main" >> /etc/apt/sources.list.d/python.list && \
echo "deb-src http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main" >> /etc/apt/sources.list.d/python.list && \
apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys BA6932366A755776 && \
apt-get update && \
apt-get install git curl python3.6 python3.6-dev -y
# Install pip for Python 3.6.
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6
# Install libraries needed for SCS.
RUN apt-get install libatlas-base-dev liblapack-dev libblas-dev -y
# Remove apt cache.
RUN rm -rf /var/lib/apt/lists/*
# Install SCS.
RUN git clone --recursive https://github.com/bodono/scs-python.git && \
cd scs-python && \
python3.6 setup.py install --scs --gpu
# Install CVXPY.
RUN pip install cvxpy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment