File size: 1,448 Bytes
0730a19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b6cc5f6
 
 
 
0730a19
 
 
b6cc5f6
 
 
0730a19
b6cc5f6
 
 
 
0730a19
 
 
 
 
 
 
 
 
 
b6cc5f6
0730a19
b6cc5f6
 
 
 
0730a19
b6cc5f6
 
0730a19
 
 
 
b6cc5f6
 
 
 
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
70
# FROM python:3.10-slim

# ENV PYTHONDONTWRITEBYTECODE=1
# ENV PYTHONUNBUFFERED=1

# WORKDIR /app

# RUN apt-get update && apt-get install -y --no-install-recommends \
#     build-essential \
#     ffmpeg \
#     libsndfile1 \
#  && rm -rf /var/lib/apt/lists/*

# COPY requirements.txt /app/requirements.txt
# RUN pip install --upgrade pip setuptools wheel
# RUN pip install --no-cache-dir -r /app/requirements.txt

# # copy app
# COPY . /app

# # expose port
# EXPOSE 7860

# # Launch
# CMD ["/bin/bash", "start.sh"]


FROM python:3.10-slim

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV OMP_NUM_THREADS=4
ENV MKL_NUM_THREADS=4
ENV OPENBLAS_NUM_THREADS=4

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    ffmpeg \
    libsndfile1 \
    libglib2.0-0 \
    libsm6 \
    libxext6 \
    libxrender-dev \
    libgomp1 \
    fontconfig \
    fonts-dejavu-core \
    && rm -rf /var/lib/apt/lists/* \
    && mkdir -p /tmp/.fontconfig /tmp/.matplotlib \
    && chmod 777 /tmp/.fontconfig /tmp/.matplotlib

# Copy and install Python dependencies
COPY requirements.txt /app/requirements.txt
RUN pip install --upgrade pip setuptools wheel
RUN pip install --no-cache-dir -r /app/requirements.txt

# Copy application files
COPY . /app

# Create tmp directory for model weights
RUN mkdir -p /tmp

# Expose port
EXPOSE 7860

# Launch
CMD ["/bin/bash", "start.sh"]