Spaces:
Sleeping
Sleeping
File size: 494 Bytes
5a2da96 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# Base image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Environment variables for better logging and HF cache
ENV TRANSFORMERS_CACHE=/tmp/hf_cache \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY app/ ./app/
# Expose port for FastAPI
EXPOSE 8000
# Start the FastAPI server
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] |