knnn11 commited on
Commit
0b17bc3
·
verified ·
1 Parent(s): fed9bdd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -27
Dockerfile CHANGED
@@ -1,28 +1,28 @@
1
- # Lightweight Python base image
2
- FROM python:3.10-slim
3
-
4
- WORKDIR /app
5
-
6
- # Install essential system libraries for Replicate/Stable Diffusion
7
- RUN apt-get update && \
8
- apt-get install -y --no-install-recommends \
9
- libgl1 \
10
- libglib2.0-0 \
11
- && rm -rf /var/lib/apt/lists/*
12
-
13
- # Install Python dependencies
14
- COPY requirements.txt .
15
- RUN pip install --no-cache-dir -r requirements.txt
16
-
17
- # Copy application files
18
- COPY app.py .
19
- COPY README.md .
20
-
21
- # Set environment variables (use HF Secrets for actual deployment)
22
- ENV REPLICATE_API_TOKEN=${REPLICATE_API_TOKEN}
23
- ENV SUPABASE_URL=${SUPABASE_URL}
24
- ENV SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY}
25
-
26
- # Run both FastAPI and Gradio servers
27
- CMD uvicorn app:app --host 0.0.0.0 --port 8000 & \
28
  gradio app.py --server-name 0.0.0.0 --server-port 7860
 
1
+ # Lightweight Python base image
2
+ FROM python:3.10-slim
3
+
4
+ WORKDIR /app
5
+
6
+ # Install essential system libraries for Replicate/Stable Diffusion
7
+ RUN apt-get update && \
8
+ apt-get install -y --no-install-recommends \
9
+ libgl1 \
10
+ libglib2.0-0 \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Install Python dependencies
14
+ COPY requirements.txt .
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy application files
18
+ COPY app.py .
19
+ COPY README.md .
20
+
21
+ # Set environment variables (use HF Secrets for actual deployment)
22
+ ENV REPLICATE_API_TOKEN=${REPLICATE_API_TOKEN}
23
+ ENV SUPABASE_URL=${SUPABASE_URL}
24
+ ENV SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY}
25
+
26
+ # Run both FastAPI and Gradio servers
27
+ CMD uvicorn app:app --host 0.0.0.0 --port 8000 & \
28
  gradio app.py --server-name 0.0.0.0 --server-port 7860