Shivakafle038 commited on
Commit
0ce6dd2
·
1 Parent(s): 2f86e28

Add Dockerfile for Hugging Face Spaces

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ libgl1-mesa-glx \
8
+ libglib2.0-0 \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy requirements first for caching
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy app files
16
+ COPY server.py .
17
+ COPY watermark_remover.py .
18
+ COPY static/ static/
19
+
20
+ # Create work directories
21
+ RUN mkdir -p work outputs
22
+
23
+ # Expose port
24
+ EXPOSE 7860
25
+
26
+ # Run the app
27
+ CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]