From 76a7f6fd6cfe6b3004e994821f4200339783a4cd Mon Sep 17 00:00:00 2001 From: thorian93 Date: Sat, 1 Jun 2024 20:02:48 -0400 Subject: [PATCH] First draft of Dockerfile overhaul. --- Dockerfile | 20 +++++++++++++++++--- README.md | 5 +++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4891bf6..1222710 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,20 @@ FROM python:3 WORKDIR /usr/src/app COPY requirements.txt ./ -COPY src ./src -COPY create_poster.py ./ -RUN pip install --no-cache-dir -r requirements.txt \ No newline at end of file +COPY ./ /usr/src/app/ + +RUN pip install --upgrade pip wheel && \ + pip install --upgrade -r requirements.txt && \ + pip install . + +RUN \ + rm -rf /usr/src/app/.git* && \ + rm -rf /usr/src/app/examples && \ + rm -rf /usr/src/app/venv + +RUN apt-get purge -y \ + make \ + gcc &&\ + apt-get autoremove -y && \ + apt-get autoclean -y && \ + apt-get clean all diff --git a/README.md b/README.md index c29beb3..0868768 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,11 @@ Create a visually appealing poster from your GPX tracks - heavily inspired by ht 7. Run `create_poster` (see above) 8. Deactivate virtualenv: `deactivate` +### Container +There is a Dockerfile in this repository, which you can use to run this software. +1. Build the container: `podman build -f Dockerfile -t gpxtrackposter:latest` +2. Run the container to build your poster: `podman run --rm -v /my/gpx/files:/gpx --name gpxtrackposter localhost/gpxtrackposter:latest create_poster --gpx-dir /gpx --output /gpx/poster.svg` + ## Usage First of all, you need directory with a bunch of GPX files (e.g. you can export all your tracks from Garmin Connect with the excellent tool [garmin-connect-export](https://github.com/kjkjava/garmin-connect-export), or use [StravaExportToGPX](https://github.com/flopp/StravaExportToGPX), or use [runtastic](https://github.com/yihong0618/Runtastic), or use [nrc-exporter](https://github.com/yasoob/nrc-exporter) to convert the activities in a Strava or Runtastic or `Nike Run Club` export zip file to GPX or GPX files).