File size: 1,044 Bytes
0f37ae7
 
 
 
 
 
 
12b9528
f6680c2
 
 
e863009
0f37ae7
b6ed6fa
12b9528
f6680c2
 
 
0f37ae7
e863009
76d5c9d
f6680c2
01b9ca1
e863009
 
0f37ae7
e863009
 
01b9ca1
0f37ae7
 
8ca02f1
0f37ae7
e863009
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
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV HF_HOME=/workspace/.cache/huggingface
ENV TRANSFORMERS_CACHE=/workspace/.cache/huggingface
ENV DIFFUSERS_CACHE=/workspace/.cache/huggingface

# Install python3.11 from deadsnakes PPA
RUN apt-get update && apt-get install -y software-properties-common &&     add-apt-repository -y ppa:deadsnakes/ppa &&     apt-get update &&     apt-get install -y \
    python3.11 python3.11-venv \
    ffmpeg libavcodec-dev libavformat-dev libswscale-dev \
    git wget curl libgl1-mesa-glx libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

# Install pip for python3.11
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11

# Upgrade pip
RUN python3.11 -m pip install --upgrade pip setuptools wheel

# Install Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Application
WORKDIR /workspace
COPY . /workspace

# Create dirs
RUN mkdir -p /workspace/outputs /workspace/.cache/huggingface

EXPOSE 7860
CMD ["python3.11", "app.py"]