Dockerfile 1.43 KB
Newer Older
chenpangpang's avatar
chenpangpang committed
1
FROM image.sourcefind.cn:5000/gpu/admin/base/jupyterlab-pytorch:2.2.0-python3.10-cuda12.1-ubuntu22.04 as base
chenpangpang's avatar
chenpangpang committed
2
3
4
5
6
ARG IMAGE=photomaker-v2
ARG IMAGE_UPPER=PhotoMaker-V2
ARG BRANCH=gpu
RUN cd /root && git clone -b $BRANCH http://developer.hpccube.com/codes/chenpangpang/$IMAGE.git
WORKDIR /root/$IMAGE/$IMAGE_UPPER
chenpangpang's avatar
chenpangpang committed
7
8
9
10
11
12
13
RUN pip install -r requirements.txt && \
    pip install onnxruntime-gpu==1.18.0 --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/

#########
# Prod  #
#########
FROM image.sourcefind.cn:5000/gpu/admin/base/jupyterlab-pytorch:2.2.0-python3.10-cuda12.1-ubuntu22.04
chenpangpang's avatar
chenpangpang committed
14
15
ARG IMAGE=photomaker-v2
ARG IMAGE_UPPER=PhotoMaker-V2
chenpangpang's avatar
chenpangpang committed
16
17
COPY chenyh/photomaker/frpc_linux_amd64_v0.2 /opt/conda/lib/python3.10/site-packages/gradio/
RUN chmod +x /opt/conda/lib/python3.10/site-packages/gradio/frpc_linux_amd64_v0.2
chenpangpang's avatar
chenpangpang committed
18
19
20
COPY chenyh/$IMAGE/TencentARC/PhotoMaker-V2 /root/$IMAGE_UPPER/TencentARC/PhotoMaker-V2
COPY chenyh/$IMAGE/TencentARC/t2i-adapter-sketch-sdxl-1.0 /root/$IMAGE_UPPER/TencentARC/t2i-adapter-sketch-sdxl-1.0
COPY chenyh/$IMAGE/SG161222/RealVisXL_V4.0 /root/$IMAGE_UPPER/SG161222/RealVisXL_V4.0
chenpangpang's avatar
chenpangpang committed
21
COPY --from=base /opt/conda/lib/python3.10/site-packages /opt/conda/lib/python3.10/site-packages
chenpangpang's avatar
chenpangpang committed
22
23
COPY --from=base /root/$IMAGE/$IMAGE_UPPER /root/$IMAGE_UPPER
COPY --from=base /root/$IMAGE/启动器.ipynb /root/$IMAGE_UPPER/start.sh /root/
chenpangpang's avatar
chenpangpang committed
24
#RUN python -c "import transformers; transformers.utils.move_cache()"