Spaces:
Sleeping
Sleeping
Create Dockerfile
#1
by
Shio-Koube
- opened
- Dockerfile +18 -0
Dockerfile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use NVIDIA PyTorch base (GPU). If CPU-only, use python:3.11-slim instead.
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /
|
| 6 |
+
|
| 7 |
+
# Copy requirements and install dependencies
|
| 8 |
+
COPY requirements.txt .
|
| 9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
+
|
| 11 |
+
# Copy the server code
|
| 12 |
+
COPY . .
|
| 13 |
+
|
| 14 |
+
# Expose FastAPI port
|
| 15 |
+
EXPOSE 8080
|
| 16 |
+
|
| 17 |
+
# Default command (can be overridden)
|
| 18 |
+
CMD ["python", "server.py", "--model-repo", "SmilingWolf/wd-eva02-large-tagger-v3"]
|