Skip to content

Commit cd2ee27

Browse files
committed
python: virtualenv: Switch to /usr/local/venv
/opt gets mounted from local user's env.. so.. that wont work Signed-off-by: Nishanth Menon <nm@ti.com>
1 parent 13e103e commit cd2ee27

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ RUN apt-get update \
6262
/var/tmp/* \
6363
/var/log/*
6464

65-
RUN python3 -m venv /opt/venv
66-
RUN . /opt/venv/bin/activate
65+
RUN python3 -m venv /usr/local/venv
66+
RUN . /usr/local/venv/bin/activate
6767

6868
RUN --mount=type=bind,source=build-env.sh,target=/tmp/build-env.sh \
6969
INSTALL_GCC=$INSTALL_GCC /tmp/build-env.sh

build-env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export DTSCHEMA_REV=v2025.06.1
1818

1919
ARIA_OPTS=( --summary-interval=5 --timeout=180 --retry-wait=10 -m 0 -x 10 -j 10 )
2020
# Get latest pip and packages in the "virtual env"
21-
if [ -f "/opt/venv/bin/activate" ]; then
22-
. /opt/venv/bin/activate
21+
if [ -f "/usr/local/venv/bin/activate" ]; then
22+
. /usr/local/venv/bin/activate
2323
fi
2424

2525
download_build_install_git()

other-configs/init

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ else
3636
echo "Not able to detect UID/GID for remapping!"
3737
fi
3838

39-
if [ -f "/opt/venv/bin/activate" ]; then
40-
. /opt/venv/bin/activate
39+
if [ -f "/usr/local/venv/bin/activate" ]; then
40+
. /usr/local/venv/bin/activate
4141
fi
4242

4343
if [ "$(id -u)" == "$(id -u developer)" ]; then

0 commit comments

Comments
 (0)