Skip to content

Commit

Permalink
Fix dockerfile of seat-adjuster example (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Meister <dennis.meister@bosch.com>

Signed-off-by: Dennis Meister <dennis.meister@bosch.com>
  • Loading branch information
dennismeister93 authored Sep 5, 2022
1 parent 4799a38 commit e85aa7d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions examples/seat-adjuster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,36 @@ FROM --platform=$TARGETPLATFORM python:3.9-slim-bullseye as builder

RUN apt-get update && apt-get install -y binutils

COPY ./src /src
COPY ./app /app

# Remove this installation for Arm64 once staticx has a prebuilt wheel for Arm64
RUN /bin/bash -c 'set -ex && \
ARCH=`uname -m` && \
if [ "$ARCH" == "aarch64" ]; then \
echo "ARM64" && \
apt-get install -y gcc && \
pip3 install --no-cache-dir scons; \
echo "ARM64" && \
apt-get install -y gcc && \
pip3 install --no-cache-dir scons; \
fi'

RUN apt-get install -y git
RUN pip3 install --no-cache-dir pyinstaller \
&& pip3 install --no-cache-dir patchelf \
&& pip3 install --no-cache-dir staticx \
&& pip3 install --no-cache-dir -r src/requirements.txt \
&& pip3 install --no-cache-dir -r src/requirements-links.txt
&& pip3 install --no-cache-dir -r ./app/requirements.txt \
&& pip3 install --no-cache-dir -r ./app/requirements-links.txt

WORKDIR /src
WORKDIR /app

RUN pyinstaller --clean -F -s VehicleApp/main.py
RUN pyinstaller --clean -F -s src/main.py

WORKDIR /src/dist
WORKDIR /app/dist

RUN staticx main run-exe

# Runner stage, to copy the executable
FROM scratch

COPY --from=builder ./src/dist/run-exe /dist/
COPY --from=builder ./app/dist/run-exe /dist/

WORKDIR /tmp
WORKDIR /dist
Expand Down

0 comments on commit e85aa7d

Please sign in to comment.