-
Notifications
You must be signed in to change notification settings - Fork 54
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
switch pyenv to uv #253
switch pyenv to uv #253
Changes from 10 commits
b415c16
63b8458
c60e49f
5e5b8ef
d178ab8
a3de1a2
f7e55c0
56067dd
fd5f9db
2232fe4
1bd9278
7bafbe4
8bd41f1
db09a10
58ad598
d434034
04d7a05
4ec3a41
c5f49df
6571d23
d91713b
8a36dae
5b4a0c9
f609d15
920962a
5b80d73
ed2e2f1
85ef729
87dd173
71f46b5
7763a31
f40e27d
6b22035
8cdd398
753f242
11ed4cb
f75ba91
ff5ae89
10ea20a
10e8f81
d7db0cf
3fbda24
2e1f21d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -78,24 +78,28 @@ RUN /tmp/agnos/openpilot_python_dependencies.sh | |||||
COPY --from=agnos-compiler-ffmpeg /tmp/ffmpeg.deb /tmp/ffmpeg.deb | ||||||
RUN cd /tmp && apt-get -o Dpkg::Options::="--force-overwrite" install -yq ./ffmpeg.deb | ||||||
|
||||||
RUN export PATH="/usr/local/pyenv/bin:/usr/local/pyenv/shims:$PATH" && \ | ||||||
export PYENV_ROOT="/usr/local/pyenv" && \ | ||||||
eval "$(pyenv init -)" && \ | ||||||
eval "$(pyenv virtualenv-init -)" && \ | ||||||
RUN export PATH="$HOME/.cargo/bin:$PATH" && \ | ||||||
export UV_BIN="$HOME/.cargo/bin" && \ | ||||||
export MAKEFLAGS="-j$(nproc)" && \ | ||||||
pip install pyqt5-sip==12.12.1 && \ | ||||||
pip install pyqt5==5.15.9 --verbose --config-settings --confirm-license= && \ | ||||||
pyenv rehash | ||||||
source .venv/bin/activate && \ | ||||||
.venv/bin/python --version && \ | ||||||
uv pip install pyqt6-sip==13.8.0 && \ | ||||||
uv pip install pyqt6==6.7.1 --verbose --config-settings="--confirm-license=" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pyqt5 can be installed from sources. I guess we should stay with pyqt5 for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have reverted to pyqt5. |
||||||
|
||||||
# Install openpilot python packages | ||||||
COPY ./userspace/pyproject.toml ./userspace/uv.lock /tmp/agnos/ | ||||||
RUN export PATH="/usr/local/pyenv/bin:/usr/local/pyenv/shims:$PATH" && \ | ||||||
export PYENV_ROOT="/usr/local/pyenv" && \ | ||||||
eval "$(pyenv init -)" && \ | ||||||
eval "$(pyenv virtualenv-init -)" && \ | ||||||
RUN export PATH="$HOME/.cargo/bin:$PATH" && \ | ||||||
export UV_BIN="$HOME/.cargo/bin" && \ | ||||||
source .venv/bin/activate && \ | ||||||
cd /tmp/agnos && \ | ||||||
export PYOPENCL_CL_PRETEND_VERSION="2.0" && \ | ||||||
MAKEFLAGS="-j$(nproc)" UV_NO_CACHE=1 uv pip install --no-cache-dir --system . | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove empty line to prevent the following docker warning: |
||||||
pc="$(find /usr/lib/ -name python3.pc) " && \ | ||||||
pcpath=${pc%/*} && \ | ||||||
export PKG_CONFIG_PATH=$pcpath && \ | ||||||
cp $pcpath"/python3.pc" $pcpath"/python-3.11.pc" && \ | ||||||
cp $pcpath"/python3-embed.pc" $pcpath"/python-3.11-embed.pc" && \ | ||||||
MAKEFLAGS="-j$(nproc)" UV_NO_CACHE=1 uv pip install --no-cache-dir . | ||||||
|
||||||
# Install nice to haves | ||||||
COPY ./userspace/install_extras.sh /tmp/agnos/ | ||||||
|
@@ -215,4 +219,4 @@ RUN rm -rf /usr/share/icons/* && \ | |||||
rm -rf /var/lib/apt/lists/* && \ | ||||||
rm -rf /home/$USERNAME/.cache && \ | ||||||
rm -rf /root/.cache && \ | ||||||
apt-get clean | ||||||
apt-get clean | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also the newline should probably be preserved. (I guess its a setting of your IDE/text editor). Same for the other files where this happened. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,9 @@ apt-get install --no-install-recommends -yq \ | |
ocl-icd-opencl-dev \ | ||
opencl-headers \ | ||
pkg-config \ | ||
libdbus-glib-1-dev \ | ||
libgirepository1.0-dev \ | ||
Comment on lines
+59
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are just build time dependencies of PyQt5? if so, these shouldn't end up in the final image. see how There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adeebshihadeh not for PyQt5 but for dbus-python in pyproject.toml. In total about 71 build time dependencies are getting installed besides the dbus-python libraries. The build time dependencies can be removed by calling purge in DockerFile but I recommend to handle build-time optimizations in another PR. |
||
python3-dev \ | ||
portaudio19-dev \ | ||
texinfo \ | ||
vnstat \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reverted to pyqt5-sip.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the installation with uv like suggested above not work?