Skip to content

Commit a960048

Browse files
committed
[FIX] problem with virtualenv/hatch combination
1 parent 665d160 commit a960048

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

Dockerfile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,20 @@ RUN apt-get update \
1515
&& rm -rf /var/lib/apt/lists/*
1616

1717
WORKDIR /src
18-
RUN pip install --upgrade hatch pip
18+
RUN pip install --upgrade pip \
19+
&& pip install "hatch<1.17" "virtualenv<20.26"
1920
COPY pyproject.toml .
20-
RUN python -m venv /app \
21-
&& hatch dep show requirements --all > requirements.txt \
22-
&& /app/bin/pip install wheel setuptools \
23-
&& /app/bin/pip install -r requirements.txt
21+
22+
RUN hatch dep show requirements --all > requirements.txt \
23+
&& pip install wheel setuptools -r requirements.txt
2424

2525
COPY . .
26-
RUN ls -la \
27-
&& hatch build \
28-
&& ls -la dist/ \
26+
RUN hatch build \
27+
&& ls -la dist/
28+
29+
# Create a clean venv for runtime and install the wheel
30+
RUN python -m venv /app \
31+
&& /app/bin/pip install --upgrade pip wheel setuptools \
2932
&& /app/bin/pip install dist/*.whl
3033

3134

@@ -44,3 +47,5 @@ RUN apt-get update \
4447

4548
COPY --from=builder /app /app
4649
ENV PATH="/app/bin:$PATH"
50+
51+
RUN python -c "import FastOMA; print(FastOMA.__version__)"

0 commit comments

Comments
 (0)