Skip to content

Commit

Permalink
Merge pull request #170 from aedocw/cuda-container2
Browse files Browse the repository at this point in the history
Add cuda container
  • Loading branch information
aedocw authored Jan 7, 2024
2 parents a01a02b + 2164352 commit c49622b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,37 @@ jobs:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}

build-and-push-cuda12-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: Dockerfile.cuda12
push: true
tags: ghcr.io/aedocw/epub2tts:release-cuda12
labels: epub2tts-cuda12

15 changes: 15 additions & 0 deletions Dockerfile.cuda12
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-devel
ARG DEBIAN_FRONTEND=noninteractive

ENV BOOK=mybook.epub

RUN mkdir /opt/epub2tts && \
apt-get update && \
apt install --no-install-recommends -y espeak-ng ffmpeg
ADD requirements.txt /opt/epub2tts/.
ADD epub2tts.py /opt/epub2tts/.
RUN pip3 install -r /opt/epub2tts/requirements.txt

ENTRYPOINT ["python3", "/opt/epub2tts/epub2tts.py"]

CMD ["--help"]

0 comments on commit c49622b

Please sign in to comment.