Kokoro-API-1 / Dockerfile
Yaron Koresh
Rename Dockerfile__ to Dockerfile
4171cbe verified
raw
history blame
1.3 kB
FROM ubuntu:devel
USER root
ENV HOME=/root \
PYTHONUNBUFFERED=1 \
PYTHONPATH=$HOME/app/python \
GRADIO_ALLOW_FLAGGING=never \
GRADIO_NUM_PORTS=1 \
GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_THEME=huggingface \
SYSTEM=spaces
COPY --chown=root --chmod=a+xrw . ~/app
WORKDIR ~/app
run apt-get update
run apt-get install -y git curl nvidia-cuda-toolkit wget git-lfs ffmpeg libsm6 libxext6 cmake rsync gcc make python3-venv libgl1 libglx-mesa0
run mkdir -p ~/miniconda3
run wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ./miniconda/install.sh
run bash ./miniconda/install.sh -b -u -p ./miniconda
run ./miniconda/bin/conda init bash
run ./miniconda/bin/activate
run ./miniconda/bin/conda env create -f ./env.yml
run git lfs install --force
run git clone https://github.com/python/cpython
run cd cpython && ./configure --enable-optimizations --with-lto --prefix=~/app/python --with-system-libmpdec=no
run cd cpython && make
run cd cpython && make test
run cd cpython && make install
run cd cpython && make clean
run PATH="${PATH:+${PATH}:}$PYTHONPATH:$HOME/app/miniconda/bin"
run python -m pip install --upgrade --no-cache-dir pip
run python -m pip install --upgrade --no-cache-dir -r deps.txt
EXPOSE 7860
ENTRYPOINT ["python", "./code.py"]