|
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 |
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
ENV PYTHONUNBUFFERED=1 |
|
ENV HF_HOME=/root/.cache/huggingface |
|
ENV TRANSFORMERS_CACHE=/root/.cache/huggingface/transformers |
|
ENV MPLCONFIGDIR=/tmp/matplotlib |
|
|
|
|
|
RUN mkdir -p /root/.cache/huggingface/transformers && \ |
|
mkdir -p /tmp/matplotlib && \ |
|
chmod -R 777 /root/.cache && \ |
|
chmod -R 777 /tmp/matplotlib |
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \ |
|
build-essential \ |
|
git \ |
|
curl \ |
|
ca-certificates \ |
|
python3-pip \ |
|
python3-dev \ |
|
python3-setuptools \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
RUN pip3 install --no-cache-dir --upgrade pip && \ |
|
|
|
pip3 install --no-cache-dir torch==2.0.1 torchvision==0.15.2 && \ |
|
|
|
pip3 install --no-cache-dir numpy==1.24.3 scipy==1.11.3 requests==2.31.0 && \ |
|
|
|
pip3 install --no-cache-dir typing-extensions==4.10.0 && \ |
|
|
|
pip3 install --no-cache-dir transformers==4.37.2 safetensors==0.4.1 huggingface_hub==0.19.4 && \ |
|
|
|
pip3 install --no-cache-dir "accelerate==0.30.0" && \ |
|
pip3 install --no-cache-dir "lmdeploy==0.5.3" && \ |
|
|
|
pip3 install --no-cache-dir bitsandbytes==0.41.3 && \ |
|
|
|
pip3 install --no-cache-dir gradio==3.38.0 && \ |
|
|
|
pip3 install --no-cache-dir packaging==23.2 pyyaml==6.0.1 tqdm==4.66.1 openai==1.6.1 |
|
|
|
|
|
COPY . . |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["python3", "app_internvl2.py"] |