File size: 1,229 Bytes
4d2f25c
 
66f8fc1
4d2f25c
66f8fc1
56069ce
 
 
 
 
 
 
 
f1f32b6
 
 
4d2f25c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ec4d5f7
4d2f25c
ec4d5f7
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
# Use NVIDIA's CUDA base image with Ubuntu 22.04
FROM pytorch/pytorch:2.4.1-cuda12.4-cudnn9-devel

ENV DEBIAN_FRONTEND=noninteractive

RUN useradd -m -u 1000 user

# Set home to the user's home directory
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app

RUN mkdir -p /home/user/.cache/huggingface/hub && \
    chown -R user:user /home/user/.cache/huggingface

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    wget \
    git \
    openssh-client \
    build-essential \
    ffmpeg \
    libsndfile1 \
    libffi-dev \
    python3 \
    python3-dev \
    python3-venv \
    python3-distutils \
    python3-pip && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

RUN python3 -m pip install --upgrade pip

RUN pip install uv
RUN python -m uv pip install packaging \
    wheel \
    accelerate \
    torch

RUN python -m uv pip install --no-build-isolation git+https://github.com/Zyphra/transformers_zamba2.git
#    git+https://github.com/Dao-AILab/[email protected] \
#    git+https://github.com/state-spaces/mamba@a07ff1b9ad2a4ac8b04eddf5eaaee5004f15aaf1 \

RUN python -m uv pip install gradio

COPY --chown=user main.py $HOME/app

CMD ["python3", "main.py"]