Skip to content
Open
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
2 changes: 2 additions & 0 deletions Docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
hostname: ${HOSTNAME} # Uses the current hostname of the system
privileged: true # Equivalent to --privileged flag
network_mode: "host" # Expose the container to the network
environment:
USE_TORCH: "1"
devices:
- "/dev/dri/renderD129:/dev/dri/renderD129" # rknpu device
volumes:
Expand Down
65 changes: 2 additions & 63 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,68 +1,7 @@
ARG TARGETPLATFORM
FROM johnylamw/488-alt-python-3.10
FROM rokadias/488-alt-python-3.11

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / Python Docker Build With OpenCV (linux/amd64)

Base image platform does not match expected target platform

InvalidBaseImagePlatform: Base image rokadias/488-alt-python-3.11 was pulled with platform "linux/arm64", expected "linux/amd64" for current build
WORKDIR /xbot/Alt/src

RUN pip install --upgrade tensorflow
RUN pip install --upgrade XTablesClient
RUN pip install --upgrade ultralytics

# ARG TARGETPLATFORM
# FROM johnylamw/alt-docker-base-python-3.10
# WORKDIR /xbot/Alt/src

# RUN apt-get update && apt-get install -y --no-install-recommends build-essential python3-dev
# # rm -rf /var/lib/apt/lists/* && apt-get clean

# # this dependency allows cmake to install
# RUN apt-get install -y python3-launchpadlib

# # Install cmake from the official repository
# RUN apt-get install -y software-properties-common && \
# add-apt-repository ppa:george-edison55/cmake-3.x && \
# apt-get update && \
# apt-get install -y cmake


# RUN apt-get update && \
# apt-get install -y python3-pip

# # installing robotpy__apriltag (currenntly this installs all of robotpy)
# WORKDIR /xbot/Alt
# RUN git clone https://github.com/robotpy/mostrobotpy.git
# # into repo
# WORKDIR /xbot/Alt/mostrobotpy
# # keep deterministic for mostrobotpy
# RUN git fetch origin
# RUN git checkout f16ab492127e01f8db152ecfd0de47acbce5674a

# RUN pip install pybind11
# RUN pip install --upgrade pip
# RUN pip install -r rdev_requirements.txt # Install project-specific dependencies
# RUN pip install numpy # Install numpy separately, as instructed
# RUN pip install devtools
# # Step 5: Make the rdev.sh script executable
# RUN chmod +x rdev.sh

# # Step 6: Run the build command to generate the wheels
# RUN ./rdev.sh ci run

# # Step 7: Install the resulting wheels
# RUN pip install dist/*.whl
# # to make this only install apriltag we can find that whl only, but it might break it


# # go back to regular workdir
# WORKDIR /xbot/Alt
# COPY non-base-requirements.txt /xbot/Alt/non-base-requirements.txt
# RUN pip install --no-cache-dir --prefer-binary -r non-base-requirements.txt

# COPY ./src/assets/librknnrt.so /usr/lib/librknnrt.so

# WORKDIR /xbot/Alt/src
# WORKDIR /xbot/Alt
# COPY non-base-requirements.txt /xbot/Alt/non-base-requirements.txt
# RUN pip install --no-cache-dir --prefer-binary -r non-base-requirements.txt

# COPY ./src/assets/librknnrt.so /usr/lib/librknnrt.so

# WORKDIR /xbot/Alt/src
RUN pip install --upgrade python-doctr[torch,viz,html,contrib]==0.11.0
2 changes: 1 addition & 1 deletion Scripts/setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi

export PYTHONPATH=$PYTHONPATH:$(realpath $SCRIPT_DIR)/src

pip install -r $SCRIPT_DIR/requirements-py-3-10.txt
pip install -r $SCRIPT_DIR/../requirements-py-3-10.txt
pip install -r $SCRIPT_DIR/dev-requirements.txt
pip install -r $SCRIPT_DIR/non-base-requirements.txt
pip install --upgrade tensorflow
Expand Down
11 changes: 7 additions & 4 deletions docker-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM python:3.10.16-slim-bookworm
FROM python:3.11.11-slim-bookworm

# Install basic dependencies, Python-related packages, and other libraries
RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \
ca-certificates curl wget \
ca-certificates cmake curl wget \
openssl git ffmpeg tar lsb-release \
procps manpages-dev unzip zip xauth swig \
python3-numpy python3-distutils python3-setuptools python3-pyqt5 python3-opencv \
Expand All @@ -15,16 +15,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \
libxext6 libxine2-dev libxrender-dev libxvidcore-dev libx264-dev \
libgtkglext1 libgtkglext1-dev libvtk9-dev libdc1394-dev \
libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libopenexr-dev \
openexr qv4l2 v4l-utils zlib1g-dev && \
openexr qv4l2 v4l-utils zlib1g-dev build-essential && \
rm -rf /var/lib/apt/lists/* && apt-get clean

# Set work directory in the container
WORKDIR /app

# Copy the local base-requirements.txt to the container
COPY /docker-base/base-requirements.txt /app/base-requirements.txt
COPY /requirements-py-3-11.txt /app/requirements-py-3-11.txt

# Install Python packages globally from base-requirements.txt
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir --prefer-binary -r /app/base-requirements.txt && \
pip install --no-cache-dir --prefer-binary h5py
pip install --no-cache-dir --prefer-binary -r /app/requirements-py-3-11.txt

RUN pip install --no-cache-dir --prefer-binary h5py rknn-toolkit2==2.3.0
167 changes: 167 additions & 0 deletions requirements-py-3-11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
absl-py==2.1.0
alt==0.0.1
anyascii==0.3.2
asttokens==2.4.1
astunparse==1.6.3
backports.tarfile==1.2.0
build==1.2.2.post1
certifi==2024.8.30
cffi==1.17.1
cfgv==3.4.0
charset-normalizer==3.4.0
click==8.1.7
cloudpickle==3.0.0
colorama==0.4.6
coloredlogs==15.0.1
contourpy==1.2.1
cryptography==44.0.0
cycler==0.12.1
deep_sort @ git+https://github.com/team488/deep_sort@79af029bb17ce867f88c5f96564c3a9824afbdcb
defusedxml==0.7.1
depthai==2.30.0.0
devtools==0.12.2
distlib==0.3.8
docutils==0.21.2
ecdsa==0.19.0
exceptiongroup==1.2.2
executing==2.2.0
fast-histogram==0.14
filelock==3.16.1
filetype==1.2.0
filterpy==1.4.5
flatbuffers==24.3.25
fonttools==4.53.1
fsspec==2024.9.0
gast==0.6.0
google-pasta==0.2.0
gorilla==0.4.0
grpcio==1.70.0
grpcio-tools==1.70.0
h5py==3.13.0
huggingface-hub==0.29.3
humanfriendly==10.0
identify==2.6.1
idna==3.10
ifaddr==0.2.0
importlib_metadata==8.5.0
importlib_resources==6.4.5
iniconfig==2.0.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.1.0
jeepney==0.8.0
Jinja2==3.1.4
jwcrypto==1.5.6
keras==3.5.0
keyring==25.4.1
Kivy==2.3.1
Kivy-Garden==0.1.5
kiwisolver==1.4.5
langdetect==1.0.9
libclang==18.1.1
llvmlite==0.44.0
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.9.2
mdurl==0.1.2
ml_dtypes==0.5.1
more-itertools==10.5.0
mpmath==1.3.0
namex==0.0.8
networkx==3.2.1
nh3==0.2.18
nodeenv==1.9.1
ntcore==0.1.7
numba==0.61.0
numpy==1.26.4
nvidia-cublas-cu12==12.8.4.1
nvidia-cuda-cupti-cu12==12.8.90
nvidia-cuda-nvrtc-cu12==12.8.93
nvidia-cuda-runtime-cu12==12.8.90
nvidia-cudnn-cu12==9.8.0.87
nvidia-cufft-cu12==11.3.3.83
nvidia-curand-cu12==10.3.9.90
nvidia-cusolver-cu12==11.7.3.90
nvidia-cusparse-cu12==12.5.8.93
nvidia-nccl-cu12==2.26.2
nvidia-nvjitlink-cu12==12.8.93
nvidia-nvtx-cu12==12.8.90
onnx==1.17.0
onnxruntime==1.21.0
onnxslim==0.1.48
opencv-python==4.10.0.84
opt-einsum==3.3.0
optree==0.12.1
packaging==24.1
pandas==2.2.2
pillow==10.4.0
pkginfo==1.10.0
platformdirs==4.3.6
pluggy==1.5.0
pre-commit==3.8.0
protobuf==5.29.2
psutil==6.1.0
py-cpuinfo==9.0.0
pyarmor.cli.core==7.6.2
pyasn1==0.6.0
pycapnp==2.0.0
pyclipper==1.3.0.post6
pycparser==2.22
pyflame==0.3.2
Pygments==2.18.0
pynetworktables==2021.0.0
pyparsing==3.1.2
pypdfium2==4.30.1
pyproject_hooks==1.2.0
pytesseract==0.3.13
pytest==8.3.3
python-dateutil==2.9.0.post0
python-doctr==0.11.0
python-jose==3.3.0
pytz==2024.1
pywin32-ctypes==0.2.3
PyYAML==6.0.2
pyzmq==26.2.0
RapidFuzz==3.12.2
readme_renderer==44.0
requests==2.32.3
requests-futures==1.0.1
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==13.9.2
robotpy-apriltag==2025.3.2.0
robotpy-wpimath==2025.3.2.0
robotpy-wpiutil==2025.3.2.0
rsa==4.9
ruamel.yaml==0.18.10
ruamel.yaml.clib==0.2.12
scikit-fmm==2025.1.29
scipy==1.13.0
seaborn==0.13.2
SecretStorage==3.3.3
shapely==2.0.7
singleton==0.1.0
six==1.16.0
sympy==1.13.3
tensorboard==2.19.0
tensorboard-data-server==0.7.2
tensorflow==2.19.0
tensorflow-io-gcs-filesystem==0.37.1
termcolor==2.4.0
tomli==2.0.1
torch==2.6.0
torchvision==0.21.0
tqdm==4.66.5
twine==5.1.1
typing_extensions==4.12.2
tzdata==2024.1
ultralytics==8.3.96
ultralytics-thop==2.0.8
urllib3==2.2.3
virtualenv==20.26.5
Werkzeug==3.0.4
wrapt==1.16.0
XTablesClient==5.7.9
zeroconf==0.145.1
zipp==3.20.2
Loading
Loading