File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -35,25 +35,22 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
3535
3636USER vscode
3737
38- COPY .python-version ./
39- RUN uv python install
40-
4138ENV VIRTUAL_ENV="/home/vscode/.local/ha-venv"
42- RUN uv venv $VIRTUAL_ENV
39+ RUN --mount=type=bind,source=.python-version,target=.python-version \
40+ uv python install \
41+ && uv venv $VIRTUAL_ENV
4342ENV PATH="$VIRTUAL_ENV/bin:$PATH"
4443
45- WORKDIR /tmp
46-
4744# Setup hass-release
4845RUN git clone --depth 1 https://github.com/home-assistant/hass-release ~/hass-release \
4946 && uv pip install -e ~/hass-release/
5047
5148# Install Python dependencies from requirements
52- COPY requirements.txt ./
53- COPY homeassistant/package_constraints.txt homeassistant/package_constraints.txt
54- RUN uv pip install -r requirements .txt
55- COPY requirements_test .txt requirements_test_pre_commit.txt ./
56- RUN uv pip install -r requirements_test.txt
49+ RUN --mount=type=bind,source= requirements.txt,target=requirements.txt \
50+ --mount=type=bind,source= homeassistant/package_constraints.txt,target= homeassistant/package_constraints.txt \
51+ --mount=type=bind,source=requirements_test .txt,target=requirements_test.txt \
52+ --mount=type=bind,source=requirements_test_pre_commit .txt,target= requirements_test_pre_commit.txt \
53+ uv pip install -r requirements.txt -r requirements_test.txt
5754
5855WORKDIR /workspaces
5956
You can’t perform that action at this time.
0 commit comments