Text_classification / Dockerfile
Tantawi's picture
Upload 13 files
f2a4578 verified
raw
history blame contribute delete
514 Bytes
FROM python:3.9
# Set working directory
WORKDIR /code
# Copy requirements first for better caching
COPY ./requirements.txt /code/requirements.txt
# Install dependencies
RUN pip install --no-cache-dir --upgrade -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
# Command to run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]