Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1: core: Update to use a newer python version and base image #2282

Merged
merged 12 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ RUN --mount=type=cache,target=/home/pi/frontend/node_modules yarn --cwd /home/pi
COPY frontend/src/assets/vehicles /home/pi/frontend/dist/vehicles

# Download binaries
FROM bluerobotics/blueos-base:v0.0.10 as downloadBinaries
FROM bluerobotics/blueos-base:v0.1.0 as downloadBinaries
COPY tools /home/pi/tools
RUN /home/pi/tools/install-static-binaries.sh

# BlueOS-docker base image
FROM bluerobotics/blueos-base:v0.0.10
FROM bluerobotics/blueos-base:v0.1.0

# Install necessary tools
COPY tools /home/pi/tools
Expand Down
12 changes: 7 additions & 5 deletions core/libs/install-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ BUILD_PACKAGES=(
apt update
apt install -y --no-install-recommends ${BUILD_PACKAGES[*]}

# Pre-Build dependencies:
# For convenience, we build ourselves the .wheel packages for dependencies
# which have no armv7 wheel in pypi. This saves a lot of build time in docker
if [[ "$(uname -m)" == "armv7l"* ]]; then
pip install https://s3.amazonaws.com/downloads.bluerobotics.com/companion-docker/wheels/aiohttp-3.7.4-cp39-cp39-linux_armv7l.whl
# Piwheels is a Python package repository providing Arm platform wheels (pre-compiled binary Python packages)
# specifically for the Raspberry Pi, making pip installations much faster.
# Packages are natively compiled on Raspberry Pi 3 and 4 hardware
if [[ "$(uname -m)" == "arm"* ]]; then
echo "Configuring pip to use piwheels"
echo "[global]" >> /etc/pip.conf
echo "extra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf
fi

CURRENT_PATH=$(dirname "$0")
Expand Down
1 change: 1 addition & 0 deletions core/services/beacon/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
version="0.1.0",
description="Mdns service",
license="MIT",
py_modules=[],
install_requires=[
"commonwealth == 0.1.0",
"loguru == 0.5.3",
Expand Down
1 change: 1 addition & 0 deletions core/services/bridget/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
version="0.1.0",
description="Manager for 'bridges' links.",
license="MIT",
py_modules=[],
install_requires=[
"bridges == 0.1.0",
"commonwealth == 0.1.0",
Expand Down
1 change: 1 addition & 0 deletions core/services/commander/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
version="0.1.0",
description="Allow the usage of simple commands from the frontend.",
license="MIT",
py_modules=[],
install_requires=[
"appdirs == 1.4.4",
"commonwealth == 0.1.0",
Expand Down
1 change: 1 addition & 0 deletions core/services/helper/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def populate_static_files() -> None:
version="0.1.0",
description="Helper information for development",
license="MIT",
py_modules=[],
install_requires=[
"aiofiles == 0.6.0",
"beautifulsoup4 == 4.9.3",
Expand Down
7 changes: 0 additions & 7 deletions core/services/install-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ BUILD_PACKAGES=(
apt update
apt install -y --no-install-recommends ${BUILD_PACKAGES[*]}

# Pre-Build dependencies:
# For convenience, we build ourselves the .wheel packages for dependencies
# which have no armv7 wheel in pypi. This saves a lot of build time in docker
if [[ "$(uname -m)" == "armv7l"* ]]; then
pip install https://s3.amazonaws.com/downloads.bluerobotics.com/companion-docker/wheels/aiohttp-3.7.4-cp39-cp39-linux_armv7l.whl
fi

# Wifi service:
## Bind path for wpa
mkdir -p /var/run/wpa_supplicant/
Expand Down
1 change: 1 addition & 0 deletions core/services/kraken/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
version="0.1.0",
description="Manages BlueOS extensions",
license="MIT",
py_modules=[],
install_requires=[
"aiodocker == 0.21.0",
"appdirs == 1.4.4",
Expand Down
1 change: 1 addition & 0 deletions core/services/ping/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
version="0.2.0",
description="Ping service for BlueRobotics' Ping1D and Pìng360",
license="MIT",
py_modules=[],
install_requires=[
"bluerobotics-ping == 0.1.5",
"bridges == 0.1.0",
Expand Down
1 change: 1 addition & 0 deletions core/services/versionchooser/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
version="0.1.0",
description="Blue Robotics Ardusub BlueOS Version Chooser",
license="MIT",
py_modules=[],
install_requires=[
"aiodocker == 0.21.0",
"aiohttp == 3.7.4",
Expand Down
1 change: 1 addition & 0 deletions core/services/wifi/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
version="0.1.0",
description="Wifi manager for wpa_supplicant",
license="MIT",
py_modules=[],
install_requires=[
"aiofiles == 0.6.0",
"commonwealth == 0.1.0",
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ description = "Blue Robotics BlueOS computer project"
authors = ["Software Department <software@bluerobotics.com>"]
license = "MIT"

[tool.setuptools]
py-modules = []

[tool.poetry.dependencies]
python = "^3.9"

Expand Down