|
|
|
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime |
|
|
|
RUN apt-get update && apt-get install -y build-essential |
|
|
|
|
|
RUN pip install --upgrade pip |
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
|
|
|
|
RUN apt-get update && apt-get install -y git libgl1-mesa-glx libglib2.0-0 |
|
|
|
|
|
RUN pip config set global.resolver legacy |
|
|
|
|
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
USER user |
|
|
|
ENV HOME=/home/user \ |
|
CUDA_HOME=/usr/local/cuda \ |
|
PATH=/home/user/.local/bin:$PATH \ |
|
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} \ |
|
LIBRARY_PATH=${CUDA_HOME}/lib64/stubs:${LIBRARY_PATH} \ |
|
PYTHONPATH=$HOME/app \ |
|
PYTHONUNBUFFERED=1 \ |
|
GRADIO_ALLOW_FLAGGING=never \ |
|
GRADIO_NUM_PORTS=1 \ |
|
GRADIO_SERVER_NAME=0.0.0.0 \ |
|
GRADIO_THEME=huggingface \ |
|
GRADIO_SHARE=False \ |
|
SYSTEM=spaces |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
COPY . . |
|
|
|
USER root |
|
RUN chmod -R 777 $HOME/app/bark_voices |
|
USER user |
|
|
|
|
|
|
|
RUN pip install --use-feature=fast-deps -r requirements.txt gradio |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ENV CUDA_DEVICE_ORDER=PCI_BUS_ID |
|
ENV CUDA_VISIBLE_DEVICES=0 |
|
|
|
|
|
CMD ["python", "app.py"] |