From bdeccf8e235298703032317c0f8948a06fa22ccd Mon Sep 17 00:00:00 2001 From: Guillem Borrell Date: Sat, 25 May 2024 22:40:59 +0200 Subject: [PATCH] Improved dockerfile. --- Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1b0ed58..5d43b12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,19 @@ # Use an official Python runtime as a parent image FROM python:3.12-slim +# Set up uv +ENV VIRTUAL_ENV=/usr/local +ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh +RUN /install.sh && rm /install.sh + # Set the working directory in the container to /app WORKDIR /app # Add the current directory contents into the container at /app ADD . /app -# Install any needed packages specified in requirements.txt -RUN pip install uv -RUN uv pip install -r requirements.txt -RUN uv pip install -e . +RUN /root/.cargo/bin/uv pip install --no-cache -r requirements.txt +RUN /root/.cargo/bin/uv pip install -e . # Make port 80 available to the world outside this container EXPOSE 80