-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·64 lines (48 loc) · 2.11 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM nvidia/cuda:11.0.3-cudnn8-runtime-ubuntu20.04
# This prevents interactive region dialoge
ENV DEBIAN_FRONTEND=noninteractive
ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib64:$LD_LIBRARY_PATH
ENV PATH=/usr/local/nvidia/bin:$PATH
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
USER root
# https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
RUN apt-key del 7fa2af80 && \
rm /etc/apt/sources.list.d/cuda.list && \
# rm /etc/apt/sources.list.d/nvidia-ml.list && \
apt-get update -y && apt-get install wget -y && \
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/$(uname -m)/cuda-keyring_1.0-1_all.deb && \
dpkg -i cuda-keyring_1.0-1_all.deb && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub && \
apt-get update -y
RUN apt update && apt install -y --no-install-recommends software-properties-common \
libsm6 libxext6 libxrender-dev curl \
&& rm -rf /var/lib/apt/lists/*
RUN echo "**** Installing Python ****" && \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt install -y build-essential python3.6 python3.6-dev python3-pip python3.6-distutils python3-apt && \
curl -O https://bootstrap.pypa.io/pip/3.6/get-pip.py && \
python3.6 get-pip.py && \
rm -rf /var/lib/apt/lists/*
RUN apt update
RUN apt install -y wget unzip git
RUN apt install -y ffmpeg libglib2.0-0 libgl1-mesa-glx
RUN echo 'alias pip=pip3.6' >> ~/.bashrc
RUN echo 'alias pip3=pip3.6' >> ~/.bashrc
RUN ln -sf /bin/python3.6 /bin/python
RUN ln -sf /bin/python3.6 /bin/python3
RUN pip3 install pip --upgrade
WORKDIR /iqf
COPY ./requirements.txt ./requirements.txt
RUN pip install -r requirements.txt
# Install IQF in the project
RUN ggit clone https://github.com/satellogic/iquaflow.git
RUN chmod 775 -R .
RUN cd iquaflow && \
pip3 install . && \
cd .. && rm -rf iquaflow
# Force a suitable torch version given your hardware
# RUN pip3 install torch==1.7.1+cu110 torchvision==0.8.2+cu110 -f https://download.pytorch.org/whl/torch_stable.html
RUN pip3 install notebook
RUN pip3 install jupyterlab
# CMD ["/bin/bash"]