diff --git a/.woodpecker/build-containers.yaml b/.woodpecker/build-containers.yaml new file mode 100644 index 0000000..49097b3 --- /dev/null +++ b/.woodpecker/build-containers.yaml @@ -0,0 +1,34 @@ +when: + - event: manual + - event: push + +steps: + - name: build_gpu + image: woodpeckerci/plugin-docker-buildx + settings: + build_args: + - "torch_cuda_arch_list=6.0 6.1 8.0 8.6+PTX" + repo: gitea.simcop2387.info/simcop2387/unsloth-base-image + auto_tag: true + tags: + - "build-${CI_PIPELINE_NUMBER}" + logins: + - registry: https://gitea.simcop2387.info/ + username: simcop2387 + password: + from_secret: docker_token + + # - name: build_cpu + # image: woodpeckerci/plugin-docker-buildx + # settings: + # repo: gitea.simcop2387.info/simcop2387/vllm-base-cpu-image + # context: vllm-mirror/ + # dockerfile: vllm-mirror/Dockerfile.cpu + # auto_tag: true + # tags: + # - "build-${CI_PIPELINE_NUMBER}" + # logins: + # - registry: https://gitea.simcop2387.info/ + # username: simcop2387 + # password: + # from_secret: docker_token diff --git a/Dockerfile b/Dockerfile index f2f709b..798b6f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,12 @@ ARG BUILD_TAG=latest ARG BUILD_BASE_TAG=latest FROM gitea.simcop2387.info/simcop2387/text-gen-os-base:$BUILD_BASE_TAG - +RUN mkdir /app/ +COPY ./unsloth/ /app/ +WORKDIR /app/ +RUN python3 -m venv /app/venv/ +RUN --mount=type=cache,target=/root/.cache/pip,rw . /app/venv/bin/activate && \ + pip3 install --upgrade pip setuptools wheel packaging && \ + pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 +RUN --mount=type=cache,target=/root/.cache/pip,rw . /app/venv/bin/activate && \ + /app/venv/bin/pip3 install "/app/[cu121-ampere]"