Spaces:
Sleeping
Sleeping
File size: 711 Bytes
49ff026 2687ec5 49ff026 7927511 49ff026 |
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 29 30 31 32 33 34 35 |
# Use official Python base
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Set locales and UTF-8
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
# Set Hugging Face cache
ENV HF_HOME="/tmp/huggingface"
ENV HF_DATASETS_CACHE="/tmp/huggingface"
ENV TRANSFORMERS_CACHE="/tmp/huggingface"
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends git build-essential && \
rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy app files
COPY . .
# Expose port
EXPOSE 7860
# Start Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|