Spaces:
Paused
Paused
try jittor build
Browse filesFiles changed (2)
1234567891011121314151617181920212223242526272829303132333435363738394041424344# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packagesname: Create and publish a Docker image for ChatGLM support
on: push: branches: - 'master'
env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }}_jittorllms
jobs: build-and-push-image: runs-on: ubuntu-latest permissions: contents: read packages: write
steps: - name: Checkout repository uses: actions/checkout@v3
- name: Log in to the Container registry uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image uses: docker/build-push-action@v4 with: context: . push: true file: docs/GithubAction+JittorLLMs tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}12345678910111213141516171819202122232425262728293031323334# 从NVIDIA源,从而支持显卡运损(检查宿主的nvidia-smi中的cuda版本必须>=11.3)FROM nvidia/cuda:11.3.1-runtime-ubuntu20.04ARG useProxyNetwork=''RUN apt-get updateRUN apt-get install -y curl proxychains curl g++RUN apt-get install -y git python python3 python-dev python3-dev --fix-missing
# use python3 as the system default pythonRUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.8
# 下载pytorchRUN python3 -m pip install torch --extra-index-url https://download.pytorch.org/whl/cu113
# 下载分支WORKDIR /gptRUN git clone https://github.com/binary-husky/chatgpt_academic.git -b jittorWORKDIR /gpt/chatgpt_academicRUN python3 -m pip install -r requirements.txtRUN python3 -m pip install -r request_llm/requirements_chatglm.txtRUN python3 -m pip install -r request_llm/requirements_newbing.txtRUN python3 -m pip install -r request_llm/requirements_jittorllms.txt -i https://pypi.jittor.org/simple -I
# 下载JittorLLMsRUN git clone https://github.com/binary-husky/JittorLLMs.git --depth 1 request_llm/jittorllms
# 禁用缓存,确保更新代码ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcacheRUN git pull
# 预热Tiktoken模块RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()'
# 启动CMD ["python3", "-u", "main.py"].github/workflows/build-with-jittorllms.ymlAdded+44
docs/GithubAction+JittorLLMsAdded+34