Skip to content

Instantly share code, notes, and snippets.

@ruloweb
Created September 30, 2018 04:11
Show Gist options
  • Save ruloweb/5378aa16b1e75f56c5b0a84386d8859b to your computer and use it in GitHub Desktop.
Save ruloweb/5378aa16b1e75f56c5b0a84386d8859b to your computer and use it in GitHub Desktop.
Dockerfile for cvspy and scs
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