forked from matatonic/openedai-vision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (23 loc) · 977 Bytes
/
Dockerfile
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
FROM python:3.11-slim
RUN apt-get update && apt-get install -y git gcc
RUN pip install --no-cache-dir --upgrade pip
RUN mkdir -p /app
RUN git clone https://github.com/01-ai/Yi --single-branch /app/Yi
RUN git clone https://github.com/dvlab-research/MGM.git --single-branch /app/MGM
RUN git clone https://github.com/TIGER-AI-Lab/Mantis.git --single-branch /app/Mantis
WORKDIR /app
COPY requirements.txt .
ARG VERSION=latest
RUN if [ "$VERSION" = "alt" ]; then echo "transformers==4.36.2" >> requirements.txt; else echo "transformers>=4.39.0\nautoawq" >> requirements.txt ; fi
# TODO: nvidia apex wheel
RUN --mount=type=cache,target=/root/.cache/pip pip install -U -r requirements.txt
WORKDIR /app/MGM
RUN pip install --no-cache-dir --no-deps -e .
WORKDIR /app/Mantis
RUN pip install --no-cache-dir --no-deps -e .
WORKDIR /app
COPY *.py .
COPY backend /app/backend
COPY model_conf_tests.json /app/model_conf_tests.json
ENV CLI_COMMAND="python vision.py"
CMD $CLI_COMMAND