mlAPI / Dockerfile
kandi1clickkits
chart code with DB
2a40f30
raw
history blame
836 Bytes
# 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"]