Create Dockerfile
Browse files- Dockerfile +17 -0
Dockerfile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official Python image
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install dependencies (curl added for debugging or future needs)
|
| 8 |
+
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
+
# Install g4f with extras
|
| 11 |
+
RUN pip install --upgrade pip && pip install -U "g4f[all]"
|
| 12 |
+
|
| 13 |
+
# Expose port (for --port 7860)
|
| 14 |
+
EXPOSE 7860
|
| 15 |
+
|
| 16 |
+
# Start the g4f server with debug
|
| 17 |
+
CMD ["python", "-m", "g4f", "--port", "7860", "--debug"]
|