Skip to content

Commit

Permalink
Docker add py user path
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoDerp committed Mar 5, 2024
1 parent 19cd9eb commit 922b952
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ COPY requirements.txt /app/
#add architecture package library if not already
RUN dpkg --add-architecture ${TARGETARCH}

#add python user path
RUN echo 'export PATH="/root/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -51,7 +53,7 @@ RUN ln -s /usr/include/hdf5/serial /usr/include/hdf5/include
RUN export HDF5_DIR=/usr/include/hdf5

#install packages from pip, use piwheels if arm
RUN [[ "${TARGETARCH}" == "armhf" || "${TARGETARCH}" == "armv7" ]] && pip3 install --index-url=https://www.piwheels.org/simple --no-cache-dir --break-system-packages -r requirements.txt || pip3 install --no-cache-dir --break-system-packages -r requirements.txt
RUN [[ "${TARGETARCH}" == "armhf" || "${TARGETARCH}" == "armv7" ]] && pip3 install --index-url=https://www.piwheels.org/simple --no-cache-dir --break-system-packages -r requirements.txt --user || pip3 install --no-cache-dir --break-system-packages -r requirements.txt --user

#remove build only packages
RUN apt-get purge -y --auto-remove \
Expand Down

0 comments on commit 922b952

Please sign in to comment.