File size: 1,693 Bytes
04e5e87
 
 
 
 
803b842
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ab5fd90
803b842
1272193
803b842
 
 
 
 
 
 
 
 
 
04e5e87
 
 
 
bbee0d0
 
 
36f27fe
68a291c
b383ad5
68a291c
36f27fe
 
68a291c
bbee0d0
36f27fe
bbee0d0
0821efe
04e5e87
 
 
 
36f27fe
 
0739217
 
 
 
 
36f27fe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel

# Install dependencies
RUN pip install uv

ENV DEBIAN_FRONTEND=noninteractive \
	TZ=Europe/Paris

# Remove any third-party apt sources to avoid issues with expiring keys.
# Install some basic utilities
RUN rm -f /etc/apt/sources.list.d/*.list && \
    apt-get update && apt-get install -y --no-install-recommends \
    curl \
    ca-certificates \
    sudo \
    git \
    wget \
    procps \
    git-lfs \
    zip \
    unzip \
    htop \
    vim \
    nano \
    bzip2 \
    libx11-6 \
    build-essential \
    libsndfile-dev \
    software-properties-common \
    espeak \
    tmux \
    ffmpeg \
 && rm -rf /var/lib/apt/lists/*

RUN add-apt-repository ppa:flexiondotorg/nvtop && \
    apt-get upgrade -y && \
    apt-get install -y --no-install-recommends nvtop

RUN curl -sL https://deb.nodesource.com/setup_14.x  | bash - && \
    apt-get install -y nodejs && \
    npm install -g configurable-http-proxy


# Set working directory
WORKDIR /app

# Clone the repository
RUN git clone https://github.com/Zyphra/Zonos.git && cd Zonos

# Set environment variables for writable cache directories
ENV TRITON_CACHE_DIR=/tmp/.triton
ENV HF_HOME=/tmp/huggingface_cache

# Ensure cache directories are writable
RUN mkdir -p $TRITON_CACHE_DIR $TRANSFORMERS_CACHE && chmod -R 777 $TRITON_CACHE_DIR $TRANSFORMERS_CACHE

# Install Python dependencies
WORKDIR /app/Zonos
RUN uv pip install --system -e . && uv pip install --system -e .[compile]
RUN uv pip install --system spaces

# Expose the Gradio default port
EXPOSE 7860

# Run the Gradio app from /app
WORKDIR /app
COPY . .

EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"

CMD ["python", "app.py"]