forked from RuKapSan/runpod-worker-comfyui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (49 loc) · 1.26 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
# Use the base image with CUDA support
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive \
PIP_PREFER_BINARY=1 \
PYTHONUNBUFFERED=1
# Use bash shell for RUN commands
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Set working directory
WORKDIR /
# Upgrade apt packages and install required dependencies
RUN apt update && \
apt upgrade -y && \
apt install -y \
python3-dev \
python3-pip \
fonts-dejavu-core \
rsync \
git \
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 Python alternative
RUN ln -s /usr/bin/python3.10 /usr/bin/python
# Install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy necessary files into the image
COPY start.sh rp_handler.py ./
COPY schemas /schemas
COPY workflows /workflows
# Make the start script executable
RUN chmod +x /start.sh
# Define the command to run the container
ENTRYPOINT ["/start.sh"]