-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
69 lines (51 loc) Β· 1.66 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
65
66
67
68
69
ARG VAR
FROM ghcr.io/frankier/openpose_focal_cpu:latest AS focal_cpu_base
RUN ln -sf /usr/bin/python3 /usr/bin/python
RUN apt-get install -y --no-install-recommends unzip libjpeg62-dev
FROM ghcr.io/frankier/openpose_focal_nvcaffe:latest AS focal_nvcaffe_base
RUN ln -sf /usr/bin/python3 /usr/bin/python
RUN apt-get install -y --no-install-recommends unzip libjpeg62-dev
RUN cd /opt && \
git clone --recursive --branch master \
https://github.com/dmlc/decord && \
cd decord && \
mkdir build && cd build && \
cmake .. \
-DUSE_CUDA=/usr/local/cuda \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
-DCMAKE_BUILD_TYPE=Release && \
make && \
cd ../python && \
python setup.py install
FROM focal_${VAR}_base
RUN python3 -m pip install --upgrade \
pip==20.2.4 \
setuptools==50.3.2 \
poetry==1.1.4
RUN poetry config virtualenvs.create false
WORKDIR /opt/skelshop
COPY pyproject.toml poetry.lock ./
RUN poetry export \
--without-hashes \
-E pipeline \
-E play \
-E ssmat \
-E face \
-E calibrate \
-E buildrefs \
-E clus | \
sed '/decord/d' > requirements.txt && \
python3 -m pip install -r requirements.txt && \
rm requirements.txt && \
rm -rf /root/.cache
COPY . /opt/skelshop
RUN echo "/opt/skelshop" > \
/usr/local/lib/python3.8/dist-packages/skelshop.pth
# And reinstall again...(!)
RUN pip install virtualenv && \
./install_rest.sh && \
python3 -m snakemake --cores 4 && \
rm -rf ~/.cache/pip/
COPY docker/skelshop_env /.skelshop_env
COPY docker/skelshop_entrypoint /.skelshop_entrypoint
ENTRYPOINT ["/usr/bin/bash", "/.skelshop_entrypoint"]