student-ai-backend / Dockerfile
Shirpi's picture
Update Dockerfile
78367de verified
raw
history blame contribute delete
490 Bytes
# Use python image
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the app code
COPY . .
# Create a writable directory for temporary file storage (Permission Fix)
RUN mkdir -p /app/temp_files && chmod 777 /app/temp_files
# Expose port 7860 (Hugging Face standard)
EXPOSE 7860
# Start the server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]