Skip to content

Commit

Permalink
Docker lite. (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot authored Jan 27, 2025
1 parent 9eb87c3 commit ebf75a7
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and push Docker image
name: Build and push Docker image [FULL]

on:
release:
Expand All @@ -17,7 +17,7 @@ jobs:
with:
script: |
const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));
await wait(300000); // Wait for 5 minutes (300000 milliseconds)
await wait(300000); // Wait for 5 minutes
- name: Login to DockerHub
uses: docker/login-action@v2
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/build_docker_lite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and push Docker image [LITE]

on:
release:
types: [published]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Wait until PyPI release is available
uses: actions/github-script@v3
with:
script: |
const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));
await wait(180000); // Wait for 3 minutes
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
iwatkot/maps4fs:${{ github.ref_name }}_lite
file: ./Dockerfile_lite
25 changes: 25 additions & 0 deletions Dockerfile_lite
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM python:3.11-slim-buster

# Dependencies for opencv.
RUN apt-get update && apt-get install -y \
libgl1-mesa-dev \
libglib2.0-0

WORKDIR /usr/src/app

COPY .streamlit /usr/src/app/.streamlit
COPY data /usr/src/app/data
COPY docs /usr/src/app/docs
COPY webui /usr/src/app/webui
COPY requirements.txt /usr/src/app/requirements.txt

RUN pip install -r requirements.txt

# Ensure the latest version of maps4fs is installed.
RUN pip install --upgrade maps4fs

EXPOSE 8501

ENV PYTHONPATH .:${PYTHONPATH}
ENV LITEVERSION True
CMD ["streamlit", "run", "./webui/webui.py"]

0 comments on commit ebf75a7

Please sign in to comment.