File size: 797 Bytes
de0b648
b4d5b33
de0b648
 
1008ebb
de0b648
9bc697b
 
 
de0b648
 
 
 
 
 
 
 
776b1d2
de0b648
 
 
 
9bc697b
 
 
de0b648
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Use the official Unsloth image which has all training deps pre-installed
FROM unsloth/unsloth:latest

USER root
WORKDIR /app

# Install dependencies using the requirements.txt file
COPY requirements.txt .
RUN /opt/venv/bin/pip install --no-cache-dir -r requirements.txt

# Copy the project files
COPY . .

# Set environment variables
ENV PYTHONPATH="/app"
ENV GRADIO_ANALYTICS_ENABLED=False
# Disable vLLM to avoid Gemma3Config import errors in the Space
ENV UNSLOTH_USE_VLLM=0

# Expose the default Gradio/FastAPI port
EXPOSE 7860

# Ensure we override the base image's entrypoint (which starts supervisord)
ENTRYPOINT []

# Start the FastAPI server (which mounts the Gradio demo at /demo)
CMD ["/opt/venv/bin/python", "-m", "uvicorn", "server.main:app", "--host", "0.0.0.0", "--port", "7860"]