1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-17 10:42:21 +01:00

[docker] Use new base container image (#8582)

This commit is contained in:
Jesse Hills
2025-04-28 11:14:50 +12:00
committed by GitHub
parent 4c8f5275f9
commit adcd6517db
14 changed files with 108 additions and 252 deletions

View File

@@ -4,25 +4,28 @@
set -e
cd "$(dirname "$0")/.."
location="venv/bin/activate"
if [ ! -n "$DEVCONTAINER" ] && [ ! -n "$VIRTUAL_ENV" ] && [ ! "$ESPHOME_NO_VENV" ]; then
python3 -m venv venv
if [ -f venv/Scripts/activate ]; then
location="venv/Scripts/activate"
if [ -x "$(command -v uv)" ]; then
uv venv venv
else
python3 -m venv venv
fi
source $location
source venv/bin/activate
fi
pip3 install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt -r requirements_dev.txt
pip3 install setuptools wheel
pip3 install -e ".[dev,test,displays]" --config-settings editable_mode=compat
if ! [ -x "$(command -v uv)" ]; then
python3 -m pip install uv
fi
uv pip install setuptools wheel
uv pip install -e ".[dev,test]" --config-settings editable_mode=compat
pre-commit install
script/platformio_install_deps.py platformio.ini --libraries --tools --platforms
mkdir .temp
mkdir -p .temp
echo
echo
echo "Virtual environment created. Run 'source $location' to use it."
echo "Virtual environment created. Run 'source venv/bin/activate' to use it."