File size: 460 Bytes
5b740bb 7f8ad64 5b740bb ce5cac0 5b740bb e70621e 5b740bb 1e231d1 c84806d e70621e 5b740bb 62a78bd 5b740bb 62a78bd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# Use the official Python image
FROM python:3.8.1
# Set the working directory
WORKDIR /app
ENV TRANSFORMERS_CACHE=/tmp/transformers_cache
# Copy requirements and application files
COPY requirements.txt /app/requirements.txt
# Install dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
COPY . .
# Expose the port for FastAPI
EXPOSE 7860
# Run the FastAPI server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|