Spaces:
Running
on
A10G
Running
on
A10G
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"] | |