-
Notifications
You must be signed in to change notification settings - Fork 4
/
DockerFile
41 lines (33 loc) · 1.59 KB
/
DockerFile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM nvidia/cuda:10.2-cudnn8-runtime-ubuntu18.04
# install miniconda (comes with python 3.7 default)
ARG CONDA_VERSION
ARG CONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh
RUN cd /stage && curl -fSsL --insecure ${CONDA_URL} -o install-conda.sh &&\
/bin/bash ./install-conda.sh -b -p /opt/conda &&\
/opt/conda/bin/conda clean -ya
ENV PATH=/opt/conda/bin:${PATH}
# Add arch list to environment variable
ARG TORCH_CUDA_ARCH_LIST="Kepler;Kepler+Tesla;Maxwell;Maxwell+Tegra;Pascal;Volta;Turing"
ENV TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST}"
# pytorch
RUN conda install pytorch==1.7.0 torchvision cudatoolkit=10.2 -c pytorch
# torch-geometric
RUN pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.7.0+cu102.html
RUN pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.7.0+cu102.html
RUN pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.7.0+cu102.html
RUN pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.7.0+cu102.html
RUN pip install torch-geometric
# install ngspice
# Get the prerequisites
RUN sudo apt-get update \
&& sudo apt-get install -y \
libreadline6-dev
RUN cd /tmp \
&& wget https://versaweb.dl.sourceforge.net/project/ngspice/ng-spice-rework/old-releases/27/ngspice-27.tar.gz \
&& tar -zxvf ngspice-27.tar.gz \
&& cd ngspice-27 \
&& ./configure --enable-xspice --disable-debug --with-readline=yes --enable-openmp \
&& make \
&& sudo make install
COPY requirements.txt /tmp/requirements.txt
RUN conda install --file /tmp/requirements.txt