FROM python:3.8 # Use a virtual environment. RUN python -m venv /app/venv ENV PATH="/app/venv/bin:$PATH" # Upgrade pip. RUN python -m pip install --upgrade pip # Make a directory for the service files and copy the service repo into the container. WORKDIR /app/service COPY . . # Install module & dependencies RUN python3 -m pip install -e . RUN python3 -m pip install -r requirements.txt # Run the service loop. CMD ["python", "src/serve.py"]