mirror of https://github.com/coqui-ai/TTS.git
Build and publish CPU only Docker image
parent
27cf388a79
commit
7bb45a20ec
|
@ -14,6 +14,9 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: ["amd64"]
|
arch: ["amd64"]
|
||||||
|
base:
|
||||||
|
- "nvcr.io/nvidia/pytorch:22.03-py3" # GPU enabled
|
||||||
|
- "ubuntu:20.04" # CPU only
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
|
@ -28,6 +31,11 @@ jobs:
|
||||||
set -ex
|
set -ex
|
||||||
base="ghcr.io/coqui-ai/tts"
|
base="ghcr.io/coqui-ai/tts"
|
||||||
tags="" # PR build
|
tags="" # PR build
|
||||||
|
|
||||||
|
if [[ ${{ matrix.base }} = "ubuntu:20.04" ]]; then
|
||||||
|
base="ghcr.io/coqui-ai/tts-cpu"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${{ startsWith(github.ref, 'refs/heads/') }}" = "true" ]]; then
|
if [[ "${{ startsWith(github.ref, 'refs/heads/') }}" = "true" ]]; then
|
||||||
# Push to branch
|
# Push to branch
|
||||||
github_ref="${{ github.ref }}"
|
github_ref="${{ github.ref }}"
|
||||||
|
@ -53,4 +61,5 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/${{ matrix.arch }}
|
platforms: linux/${{ matrix.arch }}
|
||||||
push: ${{ github.event_name == 'push' }}
|
push: ${{ github.event_name == 'push' }}
|
||||||
|
build-args: "BASE=${{ matrix.base }}"
|
||||||
tags: ${{ steps.compute-tag.outputs.tags }}
|
tags: ${{ steps.compute-tag.outputs.tags }}
|
||||||
|
|
12
Dockerfile
12
Dockerfile
|
@ -1,6 +1,14 @@
|
||||||
FROM nvcr.io/nvidia/pytorch:22.03-py3
|
ARG BASE=nvcr.io/nvidia/pytorch:22.03-py3
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends espeak espeak-ng && rm -rf /var/lib/apt/lists/*
|
FROM ${BASE}
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip python3-venv python3-wheel espeak libsndfile1-dev && rm -rf /var/lib/apt/lists/*
|
||||||
RUN pip install llvmlite --ignore-installed
|
RUN pip install llvmlite --ignore-installed
|
||||||
|
|
||||||
|
# Create and activate virtual env
|
||||||
|
ENV VIRTUAL_ENV=/venv
|
||||||
|
RUN python3 -m venv $VIRTUAL_ENV
|
||||||
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||||
|
RUN pip install -U pip setuptools wheel
|
||||||
|
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
COPY requirements.txt /root
|
COPY requirements.txt /root
|
||||||
COPY requirements.dev.txt /root
|
COPY requirements.dev.txt /root
|
||||||
|
|
Loading…
Reference in New Issue