-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.janus
41 lines (35 loc) · 969 Bytes
/
Dockerfile.janus
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
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04
ENV PYTHONPATH=""
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
HF_HOME=/root/.cache/huggingface \
TRANSFORMERS_CACHE=/root/.cache/huggingface \
PYTHONPATH="/app/Janus:${PYTHONPATH}"
RUN apt-get update && apt-get install -y \
python3 \
python3-dev \
python3-pip \
git \
libgl1-mesa-glx \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --upgrade pip
WORKDIR /app
COPY Janus/ Janus/
COPY pip_cache/ /root/.cache/pip/
WORKDIR /app/Janus
RUN pip3 install -e .
RUN pip3 install \
torch==2.4.0 torchvision==0.19.0 \
--extra-index-url https://download.pytorch.org/whl/cu122 \
--find-links /root/.cache/pip/ \
transformers==4.44.0 \
accelerate==0.33.0 \
gradio==4.44.1 \
sentencepiece==0.2.0 \
pillow==10.4.0 \
numpy==1.26.4 \
tiktoken==0.5.2 \
pypinyin==0.50.0 \
tqdm==4.66.5
EXPOSE 7860
CMD ["python3", "demo/app_januspro.py"]