Spaces:
Paused
Paused
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +30 -6
Dockerfile
CHANGED
|
@@ -1,9 +1,33 @@
|
|
|
|
|
| 1 |
FROM unsloth/unsloth:latest
|
|
|
|
|
|
|
| 2 |
WORKDIR /app
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
ENV UNSLOTH_USE_VLLM=0
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Unsloth image which has all training deps pre-installed
|
| 2 |
FROM unsloth/unsloth:latest
|
| 3 |
+
|
| 4 |
+
USER root
|
| 5 |
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install server-specific dependencies on top of the Unsloth environment
|
| 8 |
+
# We use the /opt/venv which is the standard location in Unsloth images
|
| 9 |
+
RUN /opt/venv/bin/pip install --no-cache-dir \
|
| 10 |
+
fastapi \
|
| 11 |
+
uvicorn[standard] \
|
| 12 |
+
gradio \
|
| 13 |
+
openenv-core \
|
| 14 |
+
networkx \
|
| 15 |
+
matplotlib \
|
| 16 |
+
plotly \
|
| 17 |
+
pyyaml \
|
| 18 |
+
rich
|
| 19 |
+
|
| 20 |
+
# Copy the project files
|
| 21 |
+
COPY . .
|
| 22 |
+
|
| 23 |
+
# Set environment variables
|
| 24 |
+
ENV PYTHONPATH="/app"
|
| 25 |
+
ENV GRADIO_ANALYTICS_ENABLED=False
|
| 26 |
+
# Disable vLLM to avoid Gemma3Config import errors in the Space
|
| 27 |
ENV UNSLOTH_USE_VLLM=0
|
| 28 |
+
|
| 29 |
+
# Expose the default Gradio/FastAPI port
|
| 30 |
+
EXPOSE 7860
|
| 31 |
+
|
| 32 |
+
# Start the FastAPI server (which mounts the Gradio demo at /demo)
|
| 33 |
+
CMD ["/opt/venv/bin/python", "-m", "uvicorn", "server.main:app", "--host", "0.0.0.0", "--port", "7860"]
|