hellocomputer/Dockerfile

20 lines
543 B
Docker
Raw Normal View History

2024-05-25 22:13:21 +02:00
# Use an official Python runtime as a parent image
FROM python:3.12-slim
2024-05-25 22:40:59 +02:00
# Set up uv
ENV VIRTUAL_ENV=/usr/local
2024-05-25 22:13:21 +02:00
# Set the working directory in the container to /app
WORKDIR /app
# Add the current directory contents into the container at /app
ADD . /app
2024-05-25 22:48:15 +02:00
RUN pip install uv
2024-05-25 22:48:01 +02:00
RUN uv pip install --python /usr/local/bin/python3 --no-cache -r requirements.txt
RUN uv pip install --python /usr/local/bin/python3 -e .
2024-05-25 22:13:21 +02:00
2024-05-25 23:22:32 +02:00
EXPOSE 8080
2024-05-25 22:13:21 +02:00
# Run the command to start uvicorn
2024-05-25 23:22:32 +02:00
CMD ["uvicorn", "hellocomputer.main:app", "--host", "0.0.0.0", "--port", "8080"]