-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (54 loc) · 1.96 KB
/
docker-compose.yml
File metadata and controls
65 lines (54 loc) · 1.96 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Docker Compose config for local ONNX -> RKNN conversion
# Uses the same image as the GitHub Actions workflow
services:
model-converter:
container_name: rknn-converter
build:
context: .
dockerfile: Dockerfile
working_dir: /workspace
# Mount directories for input and output models
volumes:
- ./input_models:/workspace/input_models
- ./output_models:/workspace/output_models
# Example conversion command
# Add/replace parameters with your own:
# --model_source: model URL or local fiile name (should be in ./input_models/)
# --resolutions: with your required resolutions (hardcoded defaults are used if not specified)
# --target_platform: platform to convert for (default: rk3566)
# --verbose or -v: for detailed logs
command: >
--model_source Real-ESRGAN-x2plus.onnx
-v
# --- How to use ---
# 1. For a local ONNX file:
# - Place your ONNX model in ./input_models/
# - Change model.onnx to your model name in command:
# --model_source my_model.onnx
# - Run: docker-compose up
# 2. For downloading from URL:
# - Specify URL in model_source:
# --model_source https://example.com/model.onnx
# - Run: docker-compose up
# (The script will download the model automatically)
# 3. Command examples:
#
# # Real-ESRGAN x4 (1440p)
# command: >
# --model_source https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/resolve/main/Real-ESRGAN-x4plus.onnx
# --resolutions 1440x320,1440x384,1440x404
#
# # Real-ESRGAN x2 (1536p)
# command: >
# --model_source Real-ESRGAN_x2plus.onnx
# --resolutions 1536x448,1536x512,1536x576
# 4. Results:
# - Converted models will appear in ./output_models/
# - Names will include the resolution: model_dfp_WxH.rknn
# Note:
# If you need to use an image from a private registry, add:
#
# image: ghcr.io/your-username/rknn-converter:latest
# credentials:
# username: ${GITHUB_USER}
# password: ${GITHUB_TOKEN}