File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5252 echo "No dependency definition found" >&2
5353 exit 1
5454 fi && \
55- echo "Installing uvicorn with uv and linking it to the app's virtual environment" && \
56- uv pip show --python .venv/bin/python uvicorn >/dev/null 2>&1 || \
57- uv pip install --python .venv/bin/python uvicorn --link-mode=copy && \
5855 cp --remove-destination "$(readlink /app{{ .Values.folder }}/.venv/bin/python)" /app{{ .Values.folder }}/.venv/bin/python 2>/dev/null || :
5956 workingDir : /app{{ .Values.folder }}
6057 volumeMounts :
Original file line number Diff line number Diff line change @@ -16,16 +16,18 @@ ENV UV_LINK_MODE=copy
1616ENV UV_TOOL_BIN_DIR=/usr/local/bin
1717
1818COPY . /app
19- RUN sh -c 'if [ -f requirements.txt ]; then \
19+
20+ RUN if [ -f requirements.txt ]; then \
2021 echo "requirements.txt found, installing dependencies with uv pip" && \
2122 uv venv .venv --clear && \
22- uv pip install -r requirements.txt && \
23- uv pip install uvicorn; \
23+ uv pip install -r requirements.txt; \
2424 else \
2525 echo "Using uv sync for dependency installation" && \
26- uv sync --locked --no-dev && \
27- uv pip install uvicorn; \
28- fi'
26+ uv sync --locked --no-dev; \
27+ fi
28+
29+ RUN uv pip show --python .venv/bin/python uvicorn >/dev/null 2>&1 || \
30+ uv pip install --python .venv/bin/python uvicorn --link-mode=copy
2931
3032# Place executables in the environment at the front of the path
3133ENV PATH="$FOLDER/.venv/bin:$PATH"
You can’t perform that action at this time.
0 commit comments