From b44c0e6a4733fda41a6684334ed8558c895260c4 Mon Sep 17 00:00:00 2001 From: Cooper Ry Lees Date: Sun, 22 Oct 2023 13:36:19 -0700 Subject: [PATCH] Add env var, extra deps + better glob to get compiled wheel only for pip install - Also install uvloop --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d7e58a38b1c..8a70db80dcd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,14 @@ FROM python:3.11-slim AS builder RUN mkdir /src COPY . /src/ ENV VIRTUAL_ENV=/opt/venv +ENV HATCH_BUILD_HOOKS_ENABLE=1 # Install build tools to compile dependencies that don't have prebuilt wheels RUN apt update && apt install -y build-essential git python3-dev RUN python -m venv $VIRTUAL_ENV -RUN python -m pip install --no-cache-dir hatch +RUN python -m pip install --no-cache-dir hatch hatch-fancy-pypi-readme hatch-vcs RUN . /opt/venv/bin/activate && pip install --no-cache-dir --upgrade pip setuptools \ && cd /src && hatch build -t wheel \ - && pip install --no-cache-dir dist/*[colorama,d] + && pip install --no-cache-dir dist/*-cp*[colorama,d,uvloop] FROM python:3.11-slim