From ad18e3391619888c81d525a70ac0b091efc15beb Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Fri, 19 Apr 2024 18:43:21 +0200 Subject: [PATCH] Fix build --- .github/workflows/docker-cuda.yml | 73 ------------------------------- Dockerfile | 2 +- Dockerfile.cuda | 14 ------ 3 files changed, 1 insertion(+), 88 deletions(-) delete mode 100644 .github/workflows/docker-cuda.yml delete mode 100644 Dockerfile.cuda diff --git a/.github/workflows/docker-cuda.yml b/.github/workflows/docker-cuda.yml deleted file mode 100644 index 143438b..0000000 --- a/.github/workflows/docker-cuda.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Build and test CUDA - -on: - schedule: - - cron: '45 11 * * *' - push: - branches: [ "master" ] - tags: [ 'v*.*.*' ] - pull_request: - branches: [ "master" ] - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - - - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - id-token: write - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Install cosign - if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@v3.3.0 - - - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v3 - - - name: Log into registry ${{ env.REGISTRY }} - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - flavor: | - latest=${{ github.ref == 'refs/heads/master' }} - suffix=-cuda - - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@v3 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - file: ./Dockerfile.cuda - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Sign the published Docker image - if: ${{ github.event_name != 'pull_request' }} - env: - COSIGN_EXPERIMENTAL: "true" - run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign --yes {}@${{ steps.build-and-push.outputs.digest }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f8a2f89..cd718c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11.9-slim +FROM python:3.10-slim ADD src /app ADD requirements.txt /app WORKDIR /app diff --git a/Dockerfile.cuda b/Dockerfile.cuda deleted file mode 100644 index 7b02c1b..0000000 --- a/Dockerfile.cuda +++ /dev/null @@ -1,14 +0,0 @@ -FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime -ADD src /app -ADD requirements.txt /app -WORKDIR /app -RUN pip install transformers -RUN pip install -r requirements.txt - -ENV POOL_ADDRESS="127.0.0.1" -ENV POOL_PORT="5000" -ENV CACHE_PATH="/cache" -VOLUME /cache - - -CMD ["python", "-u", "main.py"]