File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ description = "Add your description here"
55authors = [{ name = " nguu0123" , email = " nguu0123@gmail.com" }]
66dependencies = []
77readme = " README.md"
8- requires-python = " >= 3.10"
8+ requires-python = " == 3.10.18 "
99
1010[tool .uv .sources ]
1111util = { workspace = true }
Original file line number Diff line number Diff line change 1+ # This's run from root dir
12FROM debian:stable-slim
23
3- WORKDIR /ensemble
4+ WORKDIR /workspace
45
56COPY --from=ghcr.io/astral-sh/uv:0.9.0 /uv /uvx /bin/
67
7- COPY ./ensemble/*. toml . /
8+ COPY pyproject. toml uv.lock /workspace /
89
9- COPY ./ensemble/run_server.sh ./ ensemble/run_server.sh
10+ RUN uv sync --frozen --no-install-workspace --package= ensemble --no-cache --compile-bytecode
1011
11- RUN uv python pin 3.10.18
12+ COPY src/ensemble /workspace/src/ensemble
1213
13- RUN uv sync --compile-bytecode --no-cache
14+ COPY src/util /workspace/src/util
1415
15- COPY ./ensemble/*.py ./ensemble/
16-
17- COPY ./ensemble/*.yaml ./ensemble/
18-
19- COPY ./util/ ./util
16+ RUN uv sync --frozen --package=ensemble --no-cache --compile-bytecode
2017
2118EXPOSE 5011
2219
23- WORKDIR /ensemble/ensemble
20+ ENV PATH= "/workspace/.venv/bin:$PATH"
2421
25- ENV PATH= "/ensemble/.venv/bin:$PATH"
22+ WORKDIR /workspace/src/ensemble
2623
2724ENTRYPOINT [ "./run_server.sh" ]
25+
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ dependencies = [
1111 " opentelemetry-instrumentation-aiohttp-client>=0.48b0" ,
1212 " aio-pika>=9.5.5" ,
1313 " opentelemetry-instrumentation-aio-pika>=0.54b1" ,
14+ " util" ,
1415]
1516
1617name = " ensemble"
1718version = " 0.1.0"
1819requires-python = " == 3.10.18"
20+
21+ [tool .uv .sources ]
22+ util = { workspace = true }
Original file line number Diff line number Diff line change 11FROM rdsea/debian-slim-opencv:latest
22
3- WORKDIR /object_classification
4-
5- COPY ./inference/onnx_model/ ./inference/onnx_model/
3+ WORKDIR /workspace
64
75COPY --from=ghcr.io/astral-sh/uv:0.9.0 /uv /uvx /bin/
86
9- COPY ./inference/*.toml ./
10-
11- RUN uv python pin 3.10.18
7+ COPY pyproject.toml uv.lock /workspace/
128
13- RUN uv sync --compile-bytecode --no-cache --extra cpu
9+ RUN uv sync --frozen --no-install-workspace --package=inference -- no-cache --compile-bytecode
1410
15- COPY . /inference/*.py ./inference/
11+ COPY src /inference /workspace/src/inference
1612
17- COPY ./inference/*.yaml ./inference/
13+ COPY src/util /workspace/src/util
1814
19- COPY ./util/ ./util
20-
21- COPY ./inference/run_server.sh ./inference/run_server.sh
15+ RUN uv sync --frozen --package=inference --no-cache --compile-bytecode
2216
2317EXPOSE 5012
2418
25- WORKDIR /object_classification/inference
19+ ENV PATH="/workspace/.venv/bin:$PATH"
2620
27- ENV PATH="/object_classification/.venv/bin:$PATH"
21+ WORKDIR /workspace/src/inference
2822
2923ENTRYPOINT [ "./run_server.sh" ]
24+
Original file line number Diff line number Diff line change @@ -8,30 +8,18 @@ RUN apt-get install -y ffmpeg libsm6 libxext6 wget
88
99COPY --from=ghcr.io/astral-sh/uv:0.9.0 /uv /uvx /bin/
1010
11- COPY . /inference/onnx_model/ ./inference/onnx_model/
11+ COPY src /inference /workspace/src/inference
1212
13- COPY ./inference/run_server.sh ./inference/run_server.sh
13+ COPY src/util /workspace/src/util
1414
15- COPY ./inference/*.toml ./
16-
17- RUN uv python pin 3.10.18
18-
19- RUN uv sync --compile-bytecode --no-cache
15+ RUN uv sync --frozen --package=inference --no-cache --compile-bytecode
2016
2117RUN wget https://pypi.jetson-ai-lab.io/jp6/cu126/+f/e1e/9e3dc2f4d5551/onnxruntime_gpu-1.23.0-cp310-cp310-linux_aarch64.whl#sha256=e1e9e3dc2f4d5551c5f0b5554cf490d141cd0d339a5a7f4826ac0e04f20a35fc
2218
23- RUN uv pip install ./onnxruntime_gpu-1.23.0-cp310-cp310-linux_aarch64.whl
24-
25- COPY ./inference/*.py ./inference/
26-
27- COPY ./inference/*.yaml ./inference/
28-
29- COPY ./util/ ./util
30-
31- EXPOSE 8050-8065
19+ RUN uv pip install ./onnxruntime_gpu-1.23.0-cp310-cp310-linux_aarch64.whl && rm ./onnxruntime_gpu-1.23.0-cp310-cp310-linux_aarch64.whl
3220
33- WORKDIR /object_classification /inference
21+ WORKDIR /workspace/src /inference
3422
35- ENV PATH="/object_classification /.venv/bin:$PATH"
23+ ENV PATH="/workspace /.venv/bin:$PATH"
3624
3725ENTRYPOINT [ "./run_server.sh" ]
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ dependencies = [
1010 " opentelemetry-exporter-otlp-proto-http>=1.27.0" ,
1111 " opentelemetry-exporter-otlp>=1.27.0" ,
1212 " opentelemetry-instrumentation-aiohttp-client>=0.48b0" ,
13+ " util" ,
1314]
1415
1516optional-dependencies.cpu = [" onnxruntime" ]
Original file line number Diff line number Diff line change 1+ # This's run from root dir
12FROM rdsea/debian-slim-opencv:latest
23
3- WORKDIR /image_preprocessing/preprocessing
4+ WORKDIR /workspace
45
56COPY --from=ghcr.io/astral-sh/uv:0.9.0 /uv /uvx /bin/
67
7- COPY ./preprocessing/*. toml . /
8+ COPY pyproject. toml uv.lock /workspace /
89
9- RUN uv python pin 3.10.18
10+ RUN uv sync --frozen --no-install-workspace --package=preprocessing --no-cache --compile-bytecode
1011
11- RUN uv sync --compile-bytecode --no-cache
12+ COPY src/preprocessing /workspace/src/preprocessing
1213
13- WORKDIR /image_preprocessing
14+ COPY src/util /workspace/src/util
1415
15- COPY ./preprocessing/run_server.sh ./preprocessing/run_server.sh
16-
17- COPY ./preprocessing/*.yaml ./preprocessing/
18-
19- COPY ./preprocessing/*.py ./preprocessing/
20-
21- COPY ./util/ ./util
16+ RUN uv sync --frozen --package=preprocessing --no-cache --compile-bytecode
2217
2318EXPOSE 5010
2419
25- WORKDIR /image_preprocessing/preprocessing
20+ ENV PATH= "/workspace/.venv/bin:$PATH"
2621
27- ENV PATH= "/image_preprocessing/preprocessing/.venv/bin:$PATH"
22+ WORKDIR /workspace/src/preprocessing
2823
2924ENTRYPOINT [ "./run_server.sh" ]
3025
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments