triflix commited on
Commit
19a20aa
·
verified ·
1 Parent(s): 947374d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +37 -0
Dockerfile ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use slim Python base
2
+ FROM python:3.11-slim
3
+
4
+ ENV PYTHONDONTWRITEBYTECODE=1
5
+ ENV PYTHONUNBUFFERED=1
6
+
7
+ # Install system deps required by instaloader (libmagic optional) and build essentials
8
+ RUN apt-get update && apt-get install -y --no-install-recommends \
9
+ build-essential \
10
+ git \
11
+ curl \
12
+ ffmpeg \
13
+ libsm6 \
14
+ libxrender1 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Set workdir
18
+ WORKDIR /app
19
+
20
+ # Copy project files
21
+ COPY . /app
22
+
23
+ # Install Python deps
24
+ RUN pip install --no-cache-dir --upgrade pip
25
+ RUN pip install --no-cache-dir fastapi uvicorn jinja2 aiofiles instaloader
26
+
27
+ # Optional: install chromadb client if you want server-side chroma integration later
28
+ RUN pip install --no-cache-dir chromadb
29
+
30
+ # Create downloads dir
31
+ RUN mkdir -p /app/downloads
32
+
33
+ # Expose HF Spaces standard port 7860
34
+ EXPOSE 7860
35
+
36
+ # Uvicorn entrypoint (bind 0.0.0.0:7860)
37
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--no-access-log"]