Spaces:
Sleeping
Sleeping
File size: 755 Bytes
a652eba 7b2d644 a652eba 7efbb38 09d1d8c a652eba 3858af4 a652eba 7efbb38 09d1d8c a652eba 7b2d644 a652eba 7b2d644 a652eba 7b2d644 4d2e98c 7b2d644 09d1d8c 7b2d644 09d1d8c 7b2d644 09d1d8c | 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 36 37 | # Use Python 3.10 (Stable for Torch/Transformers)
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PORT 7860
# Install system dependencies
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
wget \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy the application files
COPY . .
# Expose the port HF Spaces uses
EXPOSE 7860
# Make the start script executable
RUN chmod +x start.sh
# Start the application using our custom script
CMD ["./start.sh"]
|