Spaces:
Sleeping
Sleeping
# Use an official Python runtime as a parent image | |
FROM python:3.9 | |
# # Set the working directory in the container | |
WORKDIR /code | |
# # Copy the requirements file into the container | |
COPY ./requirements.txt /code/requirements.txt | |
# # Install any needed dependencies | |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
# # Install gradio | |
RUN pip install gradio | |
# # Copy the rest of the application code into the container | |
COPY . . | |
# # Expose the port that the FastAPI application will run on | |
EXPOSE 7860 | |
# # Command to run the FastAPI application with Gradio | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |
# FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8 | |
COPY ./app /app | |
RUN pip install --no-cache-dir transformers==4.11.3 gradio==2.0.6 | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80"] | |