diff --git a/.github/workflows/build-publish-latest.yaml b/.github/workflows/build-publish-latest.yaml index 042ff41..d03563c 100644 --- a/.github/workflows/build-publish-latest.yaml +++ b/.github/workflows/build-publish-latest.yaml @@ -6,7 +6,7 @@ on: - main workflow_dispatch: jobs: - publish-docker-image: + publish-latest-docker-image: runs-on: ubuntu-latest name: Build and publish docker image diff --git a/Dockerfile b/Dockerfile index 1dd5ebb..9b80a34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,15 @@ -FROM python:3.10.13-bullseye +FROM python:3.10.13-slim-bullseye WORKDIR /app # copy dist of web COPY ./web/dist /app/web/dist - -COPY ./requirements.txt /app/requirements.txt -COPY ./main.py /app/main.py COPY ./free_one_api /app/free_one_api +COPY ./requirements.txt ./main.py /app/ -RUN pip install -r requirements.txt -RUN pip uninstall torch tensorflow transformers -y -RUN rm -rf /usr/local/lib/python3.10/site-packages/nvidia* -RUN python main.py +RUN pip install --no-cache -r requirements.txt \ + && pip uninstall torch tensorflow transformers triton -y \ + && rm -rf /usr/local/lib/python3.10/site-packages/nvidia* \ + && python main.py CMD [ "python", "main.py" ] \ No newline at end of file