File size: 1,012 Bytes
3b1c353
59a871f
3b1c353
59a871f
3b1c353
 
 
 
59a871f
3b1c353
59a871f
3b1c353
59a871f
3b1c353
05d5980
59a871f
 
 
 
 
 
 
 
 
 
 
e9a6347
df27da8
e9a6347
 
df27da8
e9a6347
 
59a871f
e9a6347
 
 
 
 
 
 
 
df27da8
e9a6347
 
df27da8
e9a6347
df27da8
e9a6347
 
59a871f
e9a6347
 
59a871f
e9a6347
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
FROM python:3.10-slim

# WORKDIR /app

# Install system deps
RUN apt-get update && apt-get install -y \
    libgl1 \
    && rm -rf /var/lib/apt/lists/*

COPY . .

RUN pip install --no-cache-dir -r requirements.txt

# HF expects app on port 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]











# FROM python:3.10-slim

# # Prevent Python from buffering stdout/stderr
# ENV PYTHONUNBUFFERED=1

# # Set working directory
# WORKDIR /app

# # Install required system libraries
# RUN apt-get update && apt-get install -y --no-install-recommends \
#     libglib2.0-0 \
#     libgl1 \
#     libsm6 \
#     libxext6 \
#     libxrender1 \
#     && rm -rf /var/lib/apt/lists/*

# # Copy requirements first for better Docker layer caching
# COPY requirements.txt .

# RUN pip install --no-cache-dir -r requirements.txt

# # Copy the rest of the application
# COPY . .

# # Hugging Face Spaces uses port 7860
# EXPOSE 7860

# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]