Spaces:
Runtime error
Runtime error
File size: 746 Bytes
b3b5948 22a70b4 d82a135 22a70b4 1736c15 68aa285 1736c15 d82a135 22a70b4 d82a135 b3b5948 d82a135 1736c15 d82a135 2f34ba3 d82a135 2f34ba3 | 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 | FROM python:3.8
# Set working directory
WORKDIR /code
# Create necessary directories with proper permissions
RUN mkdir -p /tmp/uploads /tmp/models && \
chmod 777 /tmp/uploads /tmp/models
# Copy requirements first for better caching
COPY ./requirements.txt /code/requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r /code/requirements.txt
# Copy application code
COPY . /code
# Expose port 7860 (required by Hugging Face Spaces)
EXPOSE 7860
# Set environment variables
ENV PYTHONPATH=/code
ENV TMPDIR=/tmp
# Command to run the application with explicit path
# Command to run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |