mirror of https://github.com/coqui-ai/TTS.git
Make docker images lighter (#2149)
This commit is contained in:
parent
7689fadd86
commit
f85609f9bf
|
@ -15,8 +15,8 @@ jobs:
|
|||
matrix:
|
||||
arch: ["amd64"]
|
||||
base:
|
||||
# - "nvcr.io/nvidia/pytorch:22.03-py3" # GPU enabled
|
||||
- "ubuntu:20.04" # CPU only
|
||||
- "nvidia/cuda:11.8.0-base-ubuntu22.04" # GPU enabled
|
||||
- "python:3.10.8-slim" # CPU only
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Log in to the Container registry
|
||||
|
@ -32,7 +32,7 @@ jobs:
|
|||
base="ghcr.io/coqui-ai/tts"
|
||||
tags="" # PR build
|
||||
|
||||
if [[ ${{ matrix.base }} = "ubuntu:20.04" ]]; then
|
||||
if [[ ${{ matrix.base }} = "python:3.10.8-slim" ]]; then
|
||||
base="ghcr.io/coqui-ai/tts-cpu"
|
||||
fi
|
||||
|
||||
|
|
16
Dockerfile
16
Dockerfile
|
@ -1,20 +1,12 @@
|
|||
ARG BASE=nvcr.io/nvidia/pytorch:22.03-py3
|
||||
ARG BASE=nvidia/cuda:11.8.0-base-ubuntu22.04
|
||||
FROM ${BASE}
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends gcc g++ make python3 python3-dev python3-pip python3-venv python3-wheel espeak espeak-ng libsndfile1-dev && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get upgrade -y
|
||||
RUN apt-get install -y --no-install-recommends gcc g++ make python3 python3-dev python3-pip python3-venv python3-wheel espeak-ng libsndfile1-dev && rm -rf /var/lib/apt/lists/*
|
||||
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
|
||||
COPY requirements.txt /root
|
||||
COPY requirements.dev.txt /root
|
||||
COPY requirements.notebooks.txt /root
|
||||
RUN ["/bin/bash", "-c", "pip install -r <(cat requirements.txt requirements.dev.txt requirements.notebooks.txt)"]
|
||||
COPY . /root
|
||||
RUN pip3 install torch torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
|
||||
RUN make install
|
||||
ENTRYPOINT ["tts"]
|
||||
CMD ["--help"]
|
||||
|
|
Loading…
Reference in New Issue