| |
| ARG BASE_REGISTRY=docker.io |
| FROM ${BASE_REGISTRY}/nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04 |
|
|
| ARG APT_MIRROR=mirrors.tuna.tsinghua.edu.cn |
| ARG PIP_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple |
|
|
| RUN rm -f /etc/apt/sources.list && \ |
| rm -rf /etc/apt/sources.list.d/* && \ |
| echo "deb https://${APT_MIRROR}/ubuntu jammy main restricted universe multiverse" > /etc/apt/sources.list && \ |
| echo "deb https://${APT_MIRROR}/ubuntu jammy-updates main restricted universe multiverse" >> /etc/apt/sources.list && \ |
| echo "deb https://${APT_MIRROR}/ubuntu jammy-security main restricted universe multiverse" >> /etc/apt/sources.list && \ |
| apt-get update && \ |
| apt-get install -y --no-install-recommends ffmpeg python3-pip curl && \ |
| rm -rf /var/lib/apt/lists/* |
|
|
| ENV HF_ENDPOINT=https://hf-mirror.com |
|
|
| |
| |
| |
| ARG NPM_REGISTRY=https://registry.npmmirror.com |
| RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ |
| apt-get install -y --no-install-recommends nodejs && \ |
| npm config set registry ${NPM_REGISTRY} && \ |
| npm install -g @larksuite/cli && \ |
| rm -rf /var/lib/apt/lists/* /root/.npm && \ |
| (lark-cli --version || true) |
|
|
| WORKDIR /app |
|
|
| |
| COPY ./backend/requirements.txt /app/requirements.txt |
| RUN pip install --no-cache-dir -i ${PIP_INDEX} -r requirements.txt && \ |
| pip install --no-cache-dir -i ${PIP_INDEX} 'transformers[torch]>=4.23' |
|
|
| |
| COPY ./backend /app |
|
|
| CMD ["python3", "main.py"] |
|
|