-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-eval
More file actions
41 lines (27 loc) · 1.09 KB
/
Dockerfile-eval
File metadata and controls
41 lines (27 loc) · 1.09 KB
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
## BUILD FLASH-ATTN
FROM nvidia/cuda:12.8.0-cudnn-devel-ubuntu24.04 AS dependencies
ENV PYTHONUNBUFFERED=1
ENV PATH="/root/.local/bin:$PATH"
RUN apt-get update && \
apt-get install -y python3-pip python3-dev python-is-python3 python3.12-venv && \
apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Set up a venv so we can install deps
RUN python3 -m venv /app/venv
ENV PATH="/app/venv/bin:$PATH"
COPY requirements.txt /tmp/requirements.txt
RUN pip install --upgrade pip && \
pip install -r /tmp/requirements.txt && \
pip install flash-attn==2.8.0.post2 --no-build-isolation
## FINAL BUILD
FROM nvidia/cuda:12.8.0-cudnn-devel-ubuntu24.04 AS final
ENV PYTHONUNBUFFERED=1
ENV PATH="/app/venv/bin:$PATH"
RUN apt-get update && \
apt-get install -y python3-pip python3-dev python-is-python3 python3.12-venv && \
apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=dependencies /app/venv /app/venv
# Copy project files
COPY . /app
CMD ["python", "main.py", "--eval", "--batch_size", "30", "--resize_factor", "0.2", "--approach", "image_grid", "reasoning]