-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathDockerfile
47 lines (40 loc) · 1.43 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
FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-devel
RUN apt-get update -qq &&\
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libgl1-mesa-glx \
libgl1-mesa-dev \
libglib2.0-0 \
libsm6 \
libxrender1 \
libxrender1 \
libxext6 \
wget \
unzip \
git \
python3-tk \
&&\
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN cd /opt &&\
wget https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip &&\
unzip protoc-3.3.0-linux-x86_64.zip
ENV PATH_TO_PROTOC /opt
RUN cd /opt &&\
git clone https://github.com/tensorflow/models.git &&\
cd /opt/models/research/delf &&\
${PATH_TO_PROTOC?}/bin/protoc delf/protos/*.proto --python_out=. &&\
pip install -e . &&\
cd /opt/models/research/delf/delf/python/delg &&\
mkdir parameters && cd parameters &&\
wget https://storage.googleapis.com/delf/r101delg_gldv2clean_20200914.tar.gz &&\
tar -xvzf r101delg_gldv2clean_20200914.tar.gz
RUN mkdir parameters &&\
cd parameters &&\
wget https://storage.googleapis.com/delf/r101delg_gldv2clean_20200914.tar.gz &&\
tar -xvzf r101delg_gldv2clean_20200914.tar.gz
RUN cd /opt &&\
git clone https://github.com/filipradenovic/cnnimageretrieval-pytorch
ENV PYTHONPATH $PYTHONPATH:/opt/models/research:/opt/cnnimageretrieval-pytorch
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY *.py /workspace/
RUN ln -s /opt/models /workspace/models