File size: 3,386 Bytes
9c6c2ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
70
71
72
73
74
75
# syntax=docker/dockerfile:1.6

# including python 3.10 and cuda 11.8
FROM isfishingsnow/ustcai:v2.0

ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1

ARG PIP_INDEX_URL="https://mirrors.cloud.tencent.com/pypi/simple"
ARG PIP_TRUSTED_HOST="mirrors.cloud.tencent.com"

ARG HTTP_PROXY=""
ARG HTTPS_PROXY=""
ARG NO_PROXY=""

COPY wheels/*.whl /tmp/wheels/

RUN apt-get update && apt-get install -y openssh-server openssh-client cron

# install fbxsdkpy.
# RUN set -eux; \
#     if [ -n "${HTTP_PROXY}" ] || [ -n "${HTTPS_PROXY}" ]; then \
#       export HTTP_PROXY="${HTTP_PROXY}" HTTPS_PROXY="${HTTPS_PROXY}" NO_PROXY="${NO_PROXY}" \
#              http_proxy="${HTTP_PROXY}" https_proxy="${HTTPS_PROXY}" no_proxy="${NO_PROXY}"; \
#     else \
#       unset HTTP_PROXY HTTPS_PROXY NO_PROXY http_proxy https_proxy no_proxy; \
#     fi; \
#     python -m pip --verbose install fbxsdkpy --extra-index-url https://gitlab.inria.fr/api/v4/projects/18692/packages/pypi/simple

RUN set -eux; \
    if [ -n "${HTTP_PROXY}" ] || [ -n "${HTTPS_PROXY}" ]; then \
      export HTTP_PROXY="${HTTP_PROXY}" HTTPS_PROXY="${HTTPS_PROXY}" NO_PROXY="${NO_PROXY}" \
             http_proxy="${HTTP_PROXY}" https_proxy="${HTTPS_PROXY}" no_proxy="${NO_PROXY}"; \
    else \
      unset HTTP_PROXY HTTPS_PROXY NO_PROXY http_proxy https_proxy no_proxy; \
    fi; \
    python -m pip install --upgrade pip setuptools wheel \
      -i "${PIP_INDEX_URL}" --trusted-host "${PIP_TRUSTED_HOST}" \
      --root-user-action=ignore

RUN set -eux; \
    if [ -n "${HTTP_PROXY}" ] || [ -n "${HTTPS_PROXY}" ]; then \
      export HTTP_PROXY="${HTTP_PROXY}" HTTPS_PROXY="${HTTPS_PROXY}" NO_PROXY="${NO_PROXY}" \
             http_proxy="${HTTP_PROXY}" https_proxy="${HTTPS_PROXY}" no_proxy="${NO_PROXY}"; \
    else \
      unset HTTP_PROXY HTTPS_PROXY NO_PROXY http_proxy https_proxy no_proxy; \
    fi; \
    python -m pip install torch==2.5.0 torchvision==0.20.0 --index-url https://download.pytorch.org/whl/cu118

RUN set -eux; \
    if [ -n "${HTTP_PROXY}" ] || [ -n "${HTTPS_PROXY}" ]; then \
      export HTTP_PROXY="${HTTP_PROXY}" HTTPS_PROXY="${HTTPS_PROXY}" NO_PROXY="${NO_PROXY}" \
             http_proxy="${HTTP_PROXY}" https_proxy="${HTTPS_PROXY}" no_proxy="${NO_PROXY}"; \
    else \
      unset HTTP_PROXY HTTPS_PROXY NO_PROXY http_proxy https_proxy no_proxy; \
    fi; \
    python -m pip install --no-cache-dir \
      -i "${PIP_INDEX_URL}" --trusted-host "${PIP_TRUSTED_HOST}" \
      --root-user-action=ignore \
      diffusers==0.26.3 einops==0.8.1 safetensors==0.5.3 numpy==1.23.1 scipy==1.10.0 transforms3d==0.4.2 \
      moviepy==1.0.3 imageio==2.31.0 imageio-ffmpeg==0.5.1 av==13.1.0 \
      gradio==5.38.2 fastapi==0.116.1 uvicorn==0.35.0 PyYAML==6.0 omegaconf==2.3.0 \
      click==8.1.3 requests==2.32.4 openai==1.78.1 Flask==3.1.2 torchdiffeq==0.2.5 transformers==4.53.3

RUN set -eux; \
    if [ -n "${HTTP_PROXY}" ] || [ -n "${HTTPS_PROXY}" ]; then \
      export HTTP_PROXY="${HTTP_PROXY}" HTTPS_PROXY="${HTTPS_PROXY}" NO_PROXY="${NO_PROXY}" \
             http_proxy="${HTTP_PROXY}" https_proxy="${HTTPS_PROXY}" no_proxy="${NO_PROXY}"; \
    else \
      unset HTTP_PROXY HTTPS_PROXY NO_PROXY http_proxy https_proxy no_proxy; \
    fi; \
    python -m pip install --no-cache-dir --root-user-action=ignore /tmp/wheels/*.whl; \
    rm -rf /tmp/wheels