-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
69 lines (55 loc) · 1.71 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
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=on \
SHELL=/bin/bash
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Upgrade apt packages and install required dependencies
RUN apt update && \
apt upgrade -y && \
apt install -y \
python3-dev \
python3-pip \
python3.10-venv \
fonts-dejavu-core \
rsync \
git \
git-lfs \
jq \
moreutils \
aria2 \
wget \
curl \
libglib2.0-0 \
libsm6 \
libgl1 \
libxrender1 \
libxext6 \
ffmpeg \
libgoogle-perftools4 \
libtcmalloc-minimal4 \
procps && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean -y
# Set the working directory
WORKDIR /workspace
COPY . .
# RUN git clone https://github.com/s1ntecs/run-pod_instantid.git
# Install the worker dependencies
# WORKDIR /workspace/run-pod_instantid/src
RUN pip3 install --no-cache-dir torch==2.0.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 && \
pip3 install --no-cache-dir xformers==0.0.22 runpod && \
pip3 install -r requirements.txt
# pip3 install onnxruntime-gpu
# pip3 install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
# Download the checkpoints
RUN mkdir loras
RUN python3 download_checkpoints.py
# Download antelopev2 models from Huggingface
RUN git lfs install && \
git clone https://huggingface.co/ashleykleynhans/FaceAnalysis models
# Docker container start script
COPY --chmod=755 start_standalone.sh /start.sh
# Start the container
ENTRYPOINT /start.sh