Spaces:
Sleeping
Sleeping
File size: 836 Bytes
2a40f30 ad90944 2a40f30 ad90944 2a40f30 ad90944 2a40f30 ad90944 2a40f30 ad90944 2a40f30 | 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 30 31 32 33 | # FROM python:3.9
# WORKDIR /code
# COPY ./requirements.txt /code/requirements.txt
# RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# COPY . .
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
# Use the official Python image
FROM python:3.9
# Set the working directory in the container
WORKDIR /code
# Create a directory for the SQLite database file
RUN mkdir /data && chmod 777 /data
# Copy the requirements file into the container at /code
COPY ./requirements.txt /code/
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the rest of the application code into the container at /code
COPY . /code/
# Command to run on container start
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|