File size: 954 Bytes
19a20aa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2543946
19a20aa
 
 
 
 
 
 
 
 
 
 
 
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
# Use slim Python base
FROM python:3.11-slim

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Install system deps required by instaloader (libmagic optional) and build essentials
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    git \
    curl \
    ffmpeg \
    libsm6 \
    libxrender1 \
    && rm -rf /var/lib/apt/lists/*

# Set workdir
WORKDIR /app

# Copy project files
COPY . /app

# Install Python deps
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir fastapi uvicorn jinja2 aiofiles instaloader python-multipart

# Optional: install chromadb client if you want server-side chroma integration later
RUN pip install --no-cache-dir chromadb

# Create downloads dir
RUN mkdir -p /app/downloads

# Expose HF Spaces standard port 7860
EXPOSE 7860

# Uvicorn entrypoint (bind 0.0.0.0:7860)
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--no-access-log"]