From c9127901fe7933814e662246b8a233f0c2a7f97f Mon Sep 17 00:00:00 2001 From: Steven Honson Date: Fri, 1 Jan 2021 22:18:52 +1100 Subject: [PATCH 1/2] Migrate to python3 --- Dockerfile | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 93dd7c1..fa5c6f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,17 +10,17 @@ RUN apt-get update && \ build-essential \ cmake \ libglib2.0-dev \ - python \ - python-dateutil \ - python-fastkml \ - python-flask \ - python-gdal \ - python-numpy \ - python-pip \ - python-requests \ - python-serial \ - python-setuptools \ - python-shapely \ + python3 \ + python3-dateutil \ + python3-fastkml \ + python3-flask \ + python3-gdal \ + python3-numpy \ + python3-pip \ + python3-requests \ + python3-serial \ + python3-setuptools \ + python3-shapely \ unzip && \ rm -rf /var/lib/apt/lists/* @@ -34,7 +34,7 @@ ADD https://github.com/darksidelemm/cusf_predictor_wrapper/archive/master.zip /r RUN unzip /root/cusf_predictor_wrapper-master.zip -d /root && \ rm /root/cusf_predictor_wrapper-master.zip && \ cd /root/cusf_predictor_wrapper-master && \ - python setup.py install && \ + python3 setup.py install && \ cd src && \ mkdir build && \ cd build && \ @@ -52,20 +52,20 @@ RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y \ libglib2.0 \ - python \ - python-dateutil \ - python-fastkml \ - python-flask \ - python-gdal \ - python-numpy \ - python-requests \ - python-serial \ - python-shapely \ + python3 \ + python3-dateutil \ + python3-fastkml \ + python3-flask \ + python3-gdal \ + python3-numpy \ + python3-requests \ + python3-serial \ + python3-shapely \ unzip && \ rm -rf /var/lib/apt/lists/* # Copy any additional Python packages from the build container. -COPY --from=build /usr/local/lib/python2.7/dist-packages /usr/local/lib/python2.7/dist-packages +COPY --from=build /usr/local/lib/python3.7/dist-packages /usr/local/lib/python3.7/dist-packages # Copy predictor binary and get_wind_data.py from the build container. COPY --from=build /root/cusf_predictor_wrapper-master/src/build/pred /opt/chasemapper/ @@ -76,4 +76,4 @@ COPY . /opt/chasemapper # Run horusmapper.py. WORKDIR /opt/chasemapper -CMD ["python", "/opt/chasemapper/horusmapper.py"] +CMD ["python3", "/opt/chasemapper/horusmapper.py"] From 626f323ba4769f4f843211823c27075ade4d5864 Mon Sep 17 00:00:00 2001 From: Steven Honson Date: Fri, 1 Jan 2021 22:25:33 +1100 Subject: [PATCH 2/2] Use pip3 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fa5c6f4..1e82fd5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # Install additional Python packages that aren't available through apt-get. -RUN pip --no-cache-dir install \ +RUN pip3 --no-cache-dir install \ flask-socketio==4.3.2 \ pytz