diff --git a/Dockerfile b/Dockerfile index 6ad8f4b..61b0132 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,13 @@ -FROM python:3.9-slim +FROM python:3.9-slim as build WORKDIR /app RUN apt-get update && apt-get install -y gcc libpq-dev COPY requirements.txt /app +RUN pip install --user -r requirements.txt + +FROM python:3.9-slim +WORKDIR /app +COPY --from=build /root/.local /root/.local +ENV PATH=/root/.local/bin:$PATH COPY . /app -RUN pip install -r requirements.txt EXPOSE 5002 -CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5002"] \ No newline at end of file +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5002"]