streetview-proxy / Dockerfile
ford442's picture
Create Dockerfile
d52337c verified
raw
history blame
698 Bytes
# Start from a slim Python base image
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /code
# Copy the requirements file into the container
COPY ./requirements.txt /code/requirements.txt
# Install the Python dependencies specified in requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy your application file into the container
COPY ./app.py /code/app.py
# Tell Hugging Face which port the app will run on (7860 is the standard)
EXPOSE 7860
# The command to run when the container starts.
# This tells uvicorn to run the 'app' object from your 'app.py' file.
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]