From a412b3b45b6ed6f01181a6b8051c3a17f3bee0c8 Mon Sep 17 00:00:00 2001 From: Michael Lam Date: Wed, 12 Apr 2023 18:15:38 +0100 Subject: [PATCH 1/3] Updated and fixed typo due to recent change in API - Aquired --> Acquired in position_properties.py --- Dockerfile | 2 +- .../psa/connected_car_api/models/position_properties.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 582aa541..d66d5008 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,4 +22,4 @@ RUN apt-get install -y --no-install-recommends $PYTHON_DEP && \ apt-get clean ; \ rm -rf /var/lib/apt/lists/* COPY /docker_files/init.sh /init.sh -CMD /init.sh \ No newline at end of file +CMD /init.sh diff --git a/psa_car_controller/psa/connected_car_api/models/position_properties.py b/psa_car_controller/psa/connected_car_api/models/position_properties.py index 3412d52f..8961dc11 100644 --- a/psa_car_controller/psa/connected_car_api/models/position_properties.py +++ b/psa_car_controller/psa/connected_car_api/models/position_properties.py @@ -126,7 +126,7 @@ def type(self, type): :param type: The type of this PositionProperties. # noqa: E501 :type: str """ - allowed_values = ["Estimated", "Acquired", "Estimate", "Aquire"] # noqa: E501 + allowed_values = ["Estimated", "Acquired", "Estimate", "Acquire"] # noqa: E501 if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 From 32e02c5131524bed3bfd40d6dd25adbfe7bcea41 Mon Sep 17 00:00:00 2001 From: Michael Lam Date: Wed, 12 Apr 2023 20:02:33 +0100 Subject: [PATCH 2/3] Add necessary build instructions to allow the docker image to be built without manually building the python package. --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d66d5008..08694924 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,13 @@ ARG DEBIAN_FRONTEND=noninteractive FROM debian:bullseye-slim AS builder ARG PSACC_VERSION="0.0.0" ARG PYTHON_DEP +WORKDIR /psa_car_controller RUN BUILD_DEP='python3-pip python3-setuptools python3-dev libblas-dev liblapack-dev gfortran libffi-dev libxml2-dev libxslt1-dev make automake gcc g++ subversion' ; \ apt-get update && apt-get install -y --no-install-recommends $BUILD_DEP $PYTHON_DEP; -RUN pip3 install --upgrade pip && mkdir psa-car-controller && pip3 install poetry -COPY ./dist/psa_car_controller-${PSACC_VERSION}-py3-none-any.whl . -RUN pip3 install --no-cache-dir psa_car_controller-${PSACC_VERSION}-py3-none-any.whl +RUN pip3 install --upgrade pip build poetry +ADD ./ . +RUN python3 -m build +RUN pip3 install --no-cache-dir dist/psa_car_controller-${PSACC_VERSION}-py3-none-any.whl EXPOSE 5000 FROM debian:bullseye-slim From a4f8b819ec1a02cc91d1fc09f850ec223cdfb062 Mon Sep 17 00:00:00 2001 From: Michael Lam Date: Fri, 5 Apr 2024 07:22:10 +0100 Subject: [PATCH 3/3] Updated to build. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 08694924..d7a9561c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ RUN BUILD_DEP='python3-pip python3-setuptools python3-dev libblas-dev liblapack apt-get update && apt-get install -y --no-install-recommends $BUILD_DEP $PYTHON_DEP; RUN pip3 install --upgrade pip build poetry ADD ./ . -RUN python3 -m build +#RUN python3 -m build +RUN poetry build RUN pip3 install --no-cache-dir dist/psa_car_controller-${PSACC_VERSION}-py3-none-any.whl EXPOSE 5000