BasselAhmed's picture
Update Dockerfile
e70621e verified
raw
history blame contribute delete
460 Bytes
# 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"]