File size: 1,016 Bytes
b13428f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04

ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1
ENV HF_HOME=/data/huggingface
ENV HUGGINGFACE_HUB_CACHE=/data/huggingface/hub
ENV TRANSFORMERS_CACHE=/data/huggingface/transformers
ENV AIRLLM_CACHE_DIR=/data/airllm

RUN apt-get update && apt-get install -y --no-install-recommends     python3 python3-pip python3-dev git build-essential libsndfile1 ffmpeg     && rm -rf /var/lib/apt/lists/*     && ln -sf /usr/bin/python3 /usr/bin/python

WORKDIR /app
COPY requirements.txt /app/requirements.txt

RUN python3 -m pip install --upgrade pip setuptools wheel &&     python3 -m pip install --index-url https://download.pytorch.org/whl/cu124     torch torchvision torchaudio &&     python3 -m pip install -r /app/requirements.txt &&     python3 -m pip install flash-attn --no-build-isolation

COPY app.py /app/app.py

RUN mkdir -p /data/huggingface /data/models /data/airllm && chmod -R 777 /data

EXPOSE 7860
CMD ["python3", "/app/app.py"]