UI build failed in Docker python:3
ylz-at opened this issue · comments
Here is my Dockerfile,
FROM python:3
WORKDIR /opt/perfetto
COPY . .
RUN tools/install-build-deps --ui
RUN tools/gn gen out/debug --args='is_debug=true'
RUN tools/ninja -C out/debug ui
ENTRYPOINT ['./ui/run-dev-server']
build failed with error log,
52/59 python3 ../../tools/gen_ui_imports ../../ui/src/tracks --out ../../ui/src/gen/al
--out (/opt/perfetto/ui/src/gen/all_tracks.ts) parent directory (/opt/perfetto/ui/src/gen) must exist
You are handling it wrong.
https://perfetto.dev/docs/contributing/build-instructions#ui-development
Take also look at https://cs.android.com/android/platform/superproject/+/master:external/perfetto/tools/run_test_like_ci
which does the right setup for you.
Thanks.
I guess README is outdated, https://github.com/google/perfetto/blob/master/ui/README.md
Oh yeah should point to the other docs
Thanks for pointing out.
Sent out https://android-review.googlesource.com/c/platform/external/perfetto/+/1956097 to fix that readme.
Nice.
I fixed the build issue by creating symlinks before ui/build.
This might be something related to me using Docker for Windows.
FROM python:3
WORKDIR /opt/perfetto
COPY . .
RUN mkdir -p out/ui
RUN rm ui/src/gen
RUN ln -s out/ui ui/out
RUN ln -s ui/out/tsc/gen ui/src/gen
RUN tools/install-build-deps --ui
RUN ui/build
ENTRYPOINT ["./ui/run-dev-server", "--serve-host", "0.0.0.0"]