| | |
| |
|
| | ARG BASE_IMAGE=quay.io/ascend/cann:8.3.rc2-910b-ubuntu22.04-py3.11 |
| | FROM ${BASE_IMAGE} |
| |
|
| | |
| | ARG PIP_INDEX=https://pypi.org/simple |
| | ARG HTTP_PROXY="" |
| | ARG PYTORCH_INDEX=https://download.pytorch.org/whl/cpu |
| |
|
| | |
| | ENV MAX_JOBS=16 |
| | ENV FLASH_ATTENTION_FORCE_BUILD=TRUE |
| | ENV VLLM_WORKER_MULTIPROC_METHOD=spawn |
| | ENV DEBIAN_FRONTEND=noninteractive |
| | ENV NODE_OPTIONS="" |
| | ENV PIP_ROOT_USER_ACTION=ignore |
| | ENV http_proxy="${HTTP_PROXY}" |
| | ENV https_proxy="${HTTP_PROXY}" |
| |
|
| | |
| | SHELL ["/bin/bash", "-c"] |
| |
|
| | |
| | WORKDIR /app |
| |
|
| | |
| | RUN pip config set global.index-url "${PIP_INDEX}" && \ |
| | pip config set global.extra-index-url "${PIP_INDEX}" && \ |
| | pip install --no-cache-dir --upgrade pip packaging wheel setuptools editables "hatchling>=1.18.0" |
| |
|
| | |
| | COPY . /app |
| |
|
| | |
| | RUN pip uninstall -y torch torchvision torchaudio && \ |
| | pip install --no-cache-dir "torch==2.7.1" "torch-npu==2.7.1" "torchvision==0.22.1" "torchaudio==2.7.1" --index-url "${PYTORCH_INDEX}" && \ |
| | pip install --no-cache-dir -e . --no-build-isolation && \ |
| | pip install --no-cache-dir -r requirements/metrics.txt --no-build-isolation |
| |
|
| | |
| | |
| |
|
| | |
| | ENV GRADIO_SERVER_PORT=7860 |
| | EXPOSE 7860 |
| |
|
| | |
| | ENV API_PORT=8000 |
| | EXPOSE 8000 |
| |
|
| | |
| | ENV http_proxy= |
| | ENV https_proxy= |
| |
|
| | |
| | RUN pip config unset global.index-url && \ |
| | pip config unset global.extra-index-url |
| |
|