Spaces:
Build error
Build error
Create Dockerfile
Browse files- Dockerfile +59 -0
Dockerfile
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
|
| 2 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
+
RUN apt-get update && \
|
| 4 |
+
apt-get upgrade -y && \
|
| 5 |
+
apt-get install -y --no-install-recommends \
|
| 6 |
+
git \
|
| 7 |
+
git-lfs \
|
| 8 |
+
wget \
|
| 9 |
+
curl \
|
| 10 |
+
# python build dependencies \
|
| 11 |
+
build-essential \
|
| 12 |
+
libssl-dev \
|
| 13 |
+
zlib1g-dev \
|
| 14 |
+
libbz2-dev \
|
| 15 |
+
libreadline-dev \
|
| 16 |
+
libsqlite3-dev \
|
| 17 |
+
libncursesw5-dev \
|
| 18 |
+
xz-utils \
|
| 19 |
+
tk-dev \
|
| 20 |
+
libxml2-dev \
|
| 21 |
+
libxmlsec1-dev \
|
| 22 |
+
libffi-dev \
|
| 23 |
+
liblzma-dev \
|
| 24 |
+
# gradio dependencies \
|
| 25 |
+
ffmpeg \
|
| 26 |
+
# fairseq2 dependencies \
|
| 27 |
+
libsndfile-dev && \
|
| 28 |
+
apt-get clean && \
|
| 29 |
+
rm -rf /var/lib/apt/lists/*
|
| 30 |
+
|
| 31 |
+
RUN useradd -m -u 1000 user
|
| 32 |
+
USER user
|
| 33 |
+
ENV HOME=/home/user \
|
| 34 |
+
PATH=/home/user/.local/bin:${PATH}
|
| 35 |
+
WORKDIR ${HOME}/app
|
| 36 |
+
|
| 37 |
+
RUN curl https://pyenv.run | bash
|
| 38 |
+
ENV PATH=${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:${PATH}
|
| 39 |
+
ARG PYTHON_VERSION=3.10.13
|
| 40 |
+
RUN pyenv install ${PYTHON_VERSION} && \
|
| 41 |
+
pyenv global ${PYTHON_VERSION} && \
|
| 42 |
+
pyenv rehash && \
|
| 43 |
+
pip install --no-cache-dir -U pip setuptools wheel && \
|
| 44 |
+
git clone https://github.com/fakerybakery/metavoice-src ${HOME}/app/grapp && \
|
| 45 |
+
ls ${HOME}/app
|
| 46 |
+
COPY --chown=1000 ${HOME}/app/grapp ${HOME}/app
|
| 47 |
+
RUN pip install -r ${HOME}/app/requirements.txt
|
| 48 |
+
ENV PYTHONPATH=${HOME}/app \
|
| 49 |
+
PYTHONUNBUFFERED=1 \
|
| 50 |
+
HF_HUB_ENABLE_HF_TRANSFER=1 \
|
| 51 |
+
GRADIO_ALLOW_FLAGGING=never \
|
| 52 |
+
GRADIO_NUM_PORTS=1 \
|
| 53 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
| 54 |
+
GRADIO_THEME=huggingface \
|
| 55 |
+
TQDM_POSITION=-1 \
|
| 56 |
+
TQDM_MININTERVAL=1 \
|
| 57 |
+
SYSTEM=spaces
|
| 58 |
+
RUN python fam/llm/serving.py --huggingface_repo_id="metavoiceio/metavoice-1B-v0.1"
|
| 59 |
+
CMD ["python", "fam/ui/app.py"]
|