Skip to content

Commit 01bcf07

Browse files
committed
Fix file path not found in uv
1 parent a06bfd3 commit 01bcf07

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

.diploi/helm/app.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ spec:
4343
- |
4444
if [ -f pyproject.toml ]; then
4545
echo "Pyproject.toml found, installing dependencies with uv" && \
46+
uv venv .venv --clear && \
4647
uv sync --frozen --no-cache --link-mode=copy
4748
elif [ -f requirements.txt ]; then
4849
echo "requirements.txt found, installing dependencies with pip" && \

Dockerfile.dev

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ ENV UV_TOOL_BIN_DIR=/usr/local/bin
1616
# Place executables in the environment at the front of the path
1717
ENV PATH="$FOLDER/.venv/bin:$PATH"
1818

19-
# Fix uv + non-root environment
20-
ENV HOME=/tmp
21-
ENV XDG_DATA_HOME=/tmp/.local/share
22-
ENV XDG_CACHE_HOME=/tmp/.cache
23-
2419
USER root
2520
RUN apt-get update && apt-get install -y nodejs npm \
2621
&& npm install -g nodemon \
@@ -44,4 +39,4 @@ CMD ["--delay", "1", \
4439
"--watch", ".venv/lib64/*", \
4540
"--watch", "src", \
4641
"--ext", "py", \
47-
"--exec", "sh -c 'if [ -f pyproject.toml ]; then uv run --isolated --with . src/main.py; elif [ -f requirements.txt ]; then uv run --isolated --with-requirements requirements.txt src/main.py; else uv run --isolated src/main.py; fi'"]
42+
"--exec", "sh -c 'if [ -f pyproject.toml ]; then uv run --isolated --with . python src/main.py; elif [ -f requirements.txt ]; then uv run --isolated --with-requirements requirements.txt python src/main.py; else uv run --isolated python src/main.py; fi'"]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name = "hello-world"
33
version = "0.1.0"
44
description = "Add your description here"
55
readme = "README.md"
6-
requires-python = ">=3.13"
6+
requires-python = ">=3.11"
77
dependencies = []

0 commit comments

Comments
 (0)