Skip to content

Commit 2b7faca

Browse files
committed
Try installing python in init container
1 parent 4556fe6 commit 2b7faca

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.diploi/helm/app.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ spec:
4141
command: ["/bin/sh", "-c"]
4242
args:
4343
- |
44-
uv venv .venv --clear
44+
uv python install 3.11
45+
uv venv .venv --python 3.11
4546
if [ -f pyproject.toml ]; then
4647
uv pip install -e .
4748
elif [ -f requirements.txt ]; then

Dockerfile.dev

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/astral-sh/uv:python3.11-bookworm
1+
FROM ghcr.io/astral-sh/uv:bookworm-slim
22

33
# This will be set by the GitHub action to the folder containing this component.
44
ARG FOLDER=/app
@@ -9,11 +9,12 @@ RUN mkdir -p /.local/share/uv/python && chown -R 1000:1000 /.local/share/uv
99

1010
WORKDIR /app
1111

12+
ENV UV_PYTHON_INSTALL_DIR=$FOLDER/.python
1213
ENV PATH="$FOLDER/.venv/bin:$PATH"
1314
ENV PORT=8000
1415
ENV HOST="0.0.0.0"
1516

1617
USER 1000:1000
1718
EXPOSE 8000
1819

19-
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload", "--reload-dir", "src"]
20+
CMD ["uv", "run", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload", "--reload-dir", "src"]

0 commit comments

Comments
 (0)