Spaces:
Runtime error
Runtime error
File size: 579 Bytes
86eca97 9baf958 86eca97 16ae930 9baf958 86eca97 9baf958 16ae930 344a771 86eca97 9baf958 86eca97 |
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 |
# Use an official Python image
FROM python:3.9-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV TRANSFORMERS_CACHE=/app/cache
# Set work directory
WORKDIR /app
# Create cache directory
RUN mkdir -p /app/cache
# Copy the requirements file
COPY requirements.txt .
# Install dependencies
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy the app code
COPY . .
# Expose the port FastAPI will run on
EXPOSE 8000
# Run the FastAPI app with uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|