From 64d2ae1220a0df0bd44301fb59f7095a2e612e2f Mon Sep 17 00:00:00 2001 From: cswimr Date: Thu, 10 Oct 2024 15:23:57 -0400 Subject: [PATCH] move to uv --- .forgejo/workflows/build.yaml | 43 +++++++++-------------------- Dockerfile | 11 ++++++++ GalacticFactory/Dockerfile | 42 ----------------------------- GalaxyCogs/Dockerfile | 17 ------------ PyFlowery/Dockerfile | 49 --------------------------------- PyZipline/Dockerfile | 51 ----------------------------------- SeaCogs/Dockerfile | 47 -------------------------------- 7 files changed, 23 insertions(+), 237 deletions(-) create mode 100644 Dockerfile delete mode 100644 GalacticFactory/Dockerfile delete mode 100644 GalaxyCogs/Dockerfile delete mode 100644 PyFlowery/Dockerfile delete mode 100644 PyZipline/Dockerfile delete mode 100644 SeaCogs/Dockerfile diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index d3f8596..8e0bc4e 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -22,50 +22,31 @@ jobs: registry: www.coastalcommits.com username: cswimr password: ${{ secrets.COASTALCOMMITSTOKEN }} - - name: Build and push GalacticFactory image - uses: actions/docker-build-push@v5 + - name: Build and push uv image + uses: actions/docker-build-push@v6 with: context: . - file: ./GalacticFactory/Dockerfile + file: ./Dockerfile push: true - tags: www.coastalcommits.com/galacticfactory/documentation:latest - - name: Build and push GalaxyCogs image - uses: actions/docker-build-push@v5 + target: uv + tags: www.coastalcommits.com/cswimr/actions:uv + - name: Build and push docs image + uses: actions/docker-build-push@v6 with: context: . - file: ./GalaxyCogs/Dockerfile + file: ./Dockerfile push: true - tags: www.coastalcommits.com/cswimr/actions:galaxycogs - - name: Build and push PyZipline image - uses: actions/docker-build-push@v5 - with: - context: . - file: ./PyZipline/Dockerfile - push: true - tags: www.coastalcommits.com/cswimr/actions:pyzipline - - name: Build and push PyFlowery image - uses: actions/docker-build-push@v5 - with: - context: . - file: ./PyFlowery/Dockerfile - push: true - tags: www.coastalcommits.com/cswimr/actions:pyflowery - - name: Build and push SeaCogs image - uses: actions/docker-build-push@v5 - with: - context: . - file: ./SeaCogs/Dockerfile - push: true - tags: www.coastalcommits.com/cswimr/actions:seacogs + target: docs + tags: www.coastalcommits.com/cswimr/actions:docs - name: Build and push Red full image - uses: actions/docker-build-push@v5 + uses: actions/docker-build-push@v6 with: context: . file: ./Red/full/Dockerfile push: true tags: www.coastalcommits.com/cswimr/red:full - name: Build and push Red pylav image - uses: actions/docker-build-push@v5 + uses: actions/docker-build-push@v6 with: context: . file: ./Red/pylav/Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a1819ca --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM catthehacker/ubuntu:act-latest AS uv +COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv +ENV UV_PYTHON_PREFERENCE=only-managed + +FROM uv as docs +RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ + apt-get update && \ + apt-get install -y nodejs && \ + node --version + +RUN npm install -g @getmeli/cli@1.2.0 diff --git a/GalacticFactory/Dockerfile b/GalacticFactory/Dockerfile deleted file mode 100644 index 76c0320..0000000 --- a/GalacticFactory/Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -FROM catthehacker/ubuntu:act-latest - -# Install APT packages - -RUN apt-get update -RUN apt-get install -y \ - libcairo2-dev \ - libfreetype6-dev \ - libffi-dev \ - libjpeg-dev \ - libpng-dev \ - libz-dev \ - pngquant \ - python3.10-dev - -# Install Nodejs - -RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ - apt-get install -y nodejs && \ - node --version - -# Install Meli CLI - -RUN npm install -g @getmeli/cli@1.2.0 - -# Install Poetry - -RUN pip install -U click packaging colorama zipp distro importlib-metadata -RUN pip install poetry -RUN poetry config virtualenvs.create false - -# Install dependencies - -RUN curl -sSL https://www.coastalcommits.com/GalacticFactory/GalacticFactory/raw/branch/master/pyproject.toml -o pyproject.toml -RUN curl -sSL https://www.coastalcommits.com/GalacticFactory/GalacticFactory/raw/branch/master/poetry.lock -o poetry.lock -RUN poetry install --no-root - -# Install Prism Launcher -RUN curl -q 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null -RUN echo "deb [signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list -RUN apt-get update -RUN apt-get install prismlauncher -y diff --git a/GalaxyCogs/Dockerfile b/GalaxyCogs/Dockerfile deleted file mode 100644 index 58dd17b..0000000 --- a/GalaxyCogs/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM catthehacker/ubuntu:act-latest - -# Install Python 3.10 - -RUN apt-get update -RUN apt-get install -y python3.10-dev - -# Install Poetry - -RUN pip install poetry -RUN poetry config virtualenvs.create false - -# Install dependencies - -RUN curl -sSL https://www.coastalcommits.com/cswimr/GalaxyCogs/raw/branch/main/pyproject.toml -o pyproject.toml -RUN curl -sSL https://www.coastalcommits.com/cswimr/GalaxyCogs/raw/branch/main/poetry.lock -o poetry.lock -RUN poetry install --with dev --no-root diff --git a/PyFlowery/Dockerfile b/PyFlowery/Dockerfile deleted file mode 100644 index 86cb523..0000000 --- a/PyFlowery/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -FROM catthehacker/ubuntu:act-latest - -# Install APT packages - -RUN apt-get update -RUN apt-get install -y \ - libcairo2-dev \ - libfreetype6-dev \ - libffi-dev \ - libjpeg-dev \ - libpng-dev \ - libz-dev \ - pngquant - -# Install Nodejs - -RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ - apt-get install -y nodejs && \ - node --version - -# Install Meli CLI - -RUN npm install -g @getmeli/cli@1.2.0 - -# Set up deadsnakes PPA - -RUN add-apt-repository ppa:deadsnakes/ppa -y - -# Install Python 3.12 - -RUN apt-get install -y \ - python3.12 \ - python3.12-dev \ - python3.12-venv \ - python3.12-distutils - -# Upgrade pip & setuptools -RUN python3.12 -m ensurepip --upgrade -RUN python3.12 -m pip install --upgrade setuptools - -# Install Poetry -RUN python3.12 -m pip install -U poetry - -# Install dependencies - -RUN python3.12 -m pip install -U click packaging colorama zipp distro importlib-metadata -RUN curl -sSL https://www.coastalcommits.com/cswimr/PyFlowery/raw/branch/main/pyproject.toml -o pyproject.toml -RUN curl -sSL https://www.coastalcommits.com/cswimr/PyFlowery/raw/branch/main/poetry.lock -o poetry.lock -RUN python3.12 -m poetry install --with dev --with docs diff --git a/PyZipline/Dockerfile b/PyZipline/Dockerfile deleted file mode 100644 index 4683ab1..0000000 --- a/PyZipline/Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -FROM catthehacker/ubuntu:act-latest - -# Install APT packages - -RUN apt-get update -RUN apt-get install -y \ - libcairo2-dev \ - libfreetype6-dev \ - libffi-dev \ - libjpeg-dev \ - libpng-dev \ - libz-dev \ - pngquant - -# Install Nodejs - -RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ - apt-get install -y nodejs && \ - node --version - -# Install Meli CLI - -RUN npm install -g @getmeli/cli@1.2.0 - -# Set up deadsnakes PPA - -RUN add-apt-repository ppa:deadsnakes/ppa -y - -# Install Python 3.12 - -RUN apt-get install -y \ - python3.12 \ - python3.12-dev \ - python3.12-venv \ - python3.12-distutils -RUN python3.12 --version - -# Upgrade pip & setuptools -RUN python3.12 -m ensurepip --upgrade -RUN python3.12 -m pip install --upgrade setuptools - -# Install Poetry -RUN python3.12 -m pip install -U poetry -RUN poetry config virtualenvs.create false - -# Install dependencies - -RUN python3.12 -m pip install -U click packaging colorama zipp distro importlib-metadata -RUN curl -sSL https://www.coastalcommits.com/cswimr/PyZipline/raw/branch/main/pyproject.toml -o pyproject.toml -RUN curl -sSL https://www.coastalcommits.com/cswimr/PyZipline/raw/branch/main/poetry.lock -o poetry.lock -RUN poetry install --with dev --with docs --no-root diff --git a/SeaCogs/Dockerfile b/SeaCogs/Dockerfile deleted file mode 100644 index 5cc59d6..0000000 --- a/SeaCogs/Dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -FROM catthehacker/ubuntu:act-latest - -# Install APT packages - -RUN apt-get update -RUN apt-get install -y \ - libcairo2-dev \ - libfreetype6-dev \ - libffi-dev \ - libjpeg-dev \ - libpng-dev \ - libz-dev \ - pngquant - -# Install Nodejs - -RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ - apt-get install -y nodejs && \ - node --version - -# Install Meli CLI - -RUN npm install -g @getmeli/cli@1.2.0 - -# Set up deadsnakes PPA - -RUN add-apt-repository ppa:deadsnakes/ppa -y - -# Install Python 3.11 - -RUN apt-get install -y \ - python3.11 \ - python3.11-dev \ - python3.11-venv -RUN python3.11 --version - -# Install Poetry - -RUN python3.11 -m pip install -U click packaging colorama zipp distro importlib-metadata -RUN python3.11 -m pip install poetry -RUN poetry config virtualenvs.in-project true - -# Install dependencies - -RUN curl -sSL https://www.coastalcommits.com/cswimr/SeaCogs/raw/branch/main/pyproject.toml -o pyproject.toml -RUN curl -sSL https://www.coastalcommits.com/cswimr/SeaCogs/raw/branch/main/poetry.lock -o poetry.lock -RUN poetry install --with dev --with docs --no-root