File size: 961 Bytes
c184ad2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM toshas/repainting_3d_assets:v2
ENTRYPOINT []

ENV DEBIAN_FRONTEND=noninteractive

ENV REPAINTING3D_DO_NOT_MANAGE_HFCACHE=1

ENV TRANSFORMERS_CACHE=/data/hfcache
ENV HF_DATASETS_CACHE=/data/hfcache
ENV HF_HOME=/data/hfcache

RUN mkdir -p ${HF_HOME}

RUN apt-get -y update --fix-missing && \
    apt-get install -y \
        python3 \
        python3-pip \
        && \
    apt-get clean

WORKDIR ${ROOT_PROJECT}
RUN git clone https://github.com/kongdai123/repainting_3d_assets.git && \
    rm -rf repainting_3d_assets/.git repainting_3d_assets/assets repainting_3d_assets/doc && \
    rm -rf code && \
    mv repainting_3d_assets code

COPY ./requirements.txt ./
RUN pip3 install --no-cache-dir --upgrade -r requirements.txt

RUN useradd -m -u 1000 user

RUN chown -R user ${HF_HOME}

USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

ENV PYTHONUNBUFFERED=1
WORKDIR ${HOME}/app
COPY --chown=user . ${HOME}/app
CMD ["python3", "main.py"]