|
|
|
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y git-lfs build-essential bash \ |
|
git \ |
|
wget curl procps gnupg \ |
|
cmake \ |
|
htop vim nano && \ |
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
USER user |
|
WORKDIR /app |
|
ENV PATH="/home/user/.local/bin:$PATH" |
|
|
|
|
|
|
|
COPY --chown=user requirements.txt . |
|
RUN pip install --upgrade pip && \ |
|
pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
|
|
RUN pip install --no-cache-dir \ |
|
https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.2cxx11abiFALSE-cp310-cp310-linux_x86_64.whl |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
COPY --chown=user . /app |
|
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |