|
|
|
FROM nvidia/cuda:12.1-cudnn8-runtime-ubuntu20.04 |
|
|
|
|
|
WORKDIR /usr/src/app |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
ffmpeg \ |
|
build-essential \ |
|
cmake \ |
|
git \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN apt-get update && apt-get install -y python3.12 python3.12-venv python3.12-dev && \ |
|
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 |
|
|
|
|
|
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1 |
|
|
|
|
|
COPY . . |
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
RUN pip install packaging ninja |
|
RUN pip install flash-attn --no-build-isolation |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
ENV PYTHONUNBUFFERED=1 |
|
|
|
|
|
ENTRYPOINT ["python", "app.py"] |
|
|