forked from LemonFan-maker/Plus-OCR-On-Action
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (38 loc) · 1.22 KB
/
OCR-Plus.yml
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
33
34
35
36
37
38
name: OCR Service
on:
workflow_dispatch:
jobs:
OCR:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "移动一些文件"
run: |
mkdir /home/runner/ocr
mkdir /home/runner/tunnel
mv * /home/runner/ocr
- name: "设置虚拟环境"
run: |
sudo rm -rf /usr/bin/conda
export PATH="/usr/share/miniconda/bin:$PATH"
conda create -n ocr python=3.6 pip
- name: "安装依赖"
run: |
cd /home/runner/ocr
export PATH="/usr/share/miniconda/bin:$PATH"
source activate ocr
pip install -r requirements.txt
- name: "安装内网穿透服务"
run: |
cd /home/runner/ocr
aria2c "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64"
mv cloudflared-linux-amd64 cloudflared
chmod a+x cloudflared
- name: "启动OCR服务"
run: |
sudo sysctl -w net.core.rmem_max=2500000
cd /home/runner/ocr
export PATH="/usr/share/miniconda/bin:$PATH"
source activate ocr
nohup python backend/main.py &
./cloudflared tunnel --url 0.0.0.0:8087