-
-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run cmd "bazel --output_user_root=C:\_bzl build --java_runtime_version=remotejdk_11 //src:bazel.exe " has some error and can't do next step #637
Comments
You're building |
Okay, i'm trying that |
I had tryed many way, but i'am still can't download the target file. how can i proxy the target file to other url?
|
First, please pull the latest commit. You cannot build with the bazel 5.0.0 anymore (cf. #623). I cannot resolve your network issue. To mitigate it, change the timeout configurations (cf. #536 (comment)). |
i'm find that my network is not problem; |
I don't know but you may want to set By the way, I'm not sure but if you downloaded the binary, I think this error can be resolved if you place it under P.S. Note that you cannot build this plugin with the bazel 5.0.0 (#637 (comment)). |
I had tryed the other way "Windows -- windows 10" which is in wiki. the key logthe full log from cmdF:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0>python build.py build --desktop cpu --opencv=cmake -v F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\packages.config 中列出的所有程序包均已安装。 cl: 命令行 error D8022 :无法打开“bazel-out/x64_windows-opt-exec-50AE0418/bin/external/com_google_mediapipe/mediapipe/modules/objectron/calculators/_objs/lift_2d_frame_annotation_to_3d_calculator_cc_proto/lift_2d_frame_annotation_to_3d_calculator.pb.obj.params” |
Please check if there's the same issue before asking questions (cf. https://github.com/homuler/MediaPipeUnityPlugin/issues?q=D8022). If you don't know how to build the plugin,
|
oho, nice ,really very thanks. |
Plugin Version or Commit ID
v0.10.0
Unity Version
2021.2.13f1
Your Host OS
Windows10 Education
Target Platform
Windows Standalone
[Windows Only] Visual Studio C++ and Windows SDK Version
Visual Studio C++: 14.30.30704.0
Window SDK: 10.1.19041.685
[Linux Only] GCC/G++ and GLIBC Version
No response
[Android Only] Android Build Tools and NDK Version
No response
[iOS Only] XCode Version
No response
Command Sequences
I had change the docker file, because i can't download successful the corresponding file via Shell. So i download the corresponding file to my blob services, the version or any other thing is same to source
Dockerfile
ARG NODE_VERSION=16.13.0
ARG PYTHON_VERSION=3.9.9
ARG ANDROID_SDK_VERSION=30
ARG ANDROID_NDK_VERSION=21.4.7075529
FROM mcr.microsoft.com/windows/servercore:ltsc2019 as base
SHELL ["cmd", "/C"]
RUN mkdir C:\TEMP
FROM base as builder
ARG NODE_VERSION
RUN setx path "C:\msys64\usr\bin;%PATH%"
RUN curl -L https://ipench.cn/static/msys2-base-x86_64-20210604.sfx.exe -o C:\TEMP\msys2-installer.exe &&
C:\TEMP\msys2-installer.exe -y -oC:\ &&
del C:\TEMP\msys2-installer.exe
RUN bash.exe -l -c "pacman -Syuu --needed --noconfirm --noprogressbar" &&
bash.exe -l -c "pacman -Syu --needed --noconfirm --noprogressbar" &&
bash.exe -l -c "pacman -Sy --needed --noconfirm --noprogressbar" &&
bash.exe -l -c "pacman -S --needed --noconfirm git patch unzip zip p7zip" &&
bash.exe -l -c "rm -r /var/cache/pacman/pkg/*"
ARG CHANNEL_URL=https://aka.ms/vs/16/release/channel
RUN curl -L https://nodejs.org/dist/v%NODE_VERSION%/node-v%NODE_VERSION%-x64.msi -o C:\TEMP\node-install.msi &&
start /wait msiexec.exe /i C:\TEMP\node-install.msi /l*vx "%TEMP%\MSI-node-install.log" /qn ADDLOCAL=ALL &&
del C:\TEMP\node-install.msi &&
curl -L %CHANNEL_URL% -o C:\TEMP\VisualStudio.chman &&
curl -L https://aka.ms/vs/16/release/vs_buildtools.exe -o C:\TEMP\vs_buildtools.exe &&
C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache
--installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
--channelUri C:\TEMP\VisualStudio.chman
--installChannelUri C:\TEMP\VisualStudio.chman
--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended &&
curl -L https://aka.ms/vs/16/release/vc_redist.x64.exe -o C:\TEMP\vc_redist.x64.exe &&
start /wait C:\TEMP\vc_redist.x64.exe /install /quiet /norestart &&
del C:\TEMP\vc_redist.x64.exe
FROM base as python
ARG PYTHON_VERSION
RUN curl -L https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%-amd64.exe -o C:\TEMP\python-installer.exe &&
C:\TEMP\python-installer.exe -Wait /quiet InstallAllUsers=1 TargetDir=C:\Python PrependPath=1 Shortcuts=0 Include_doc=0 Include_test=0 &&
del C:\TEMP\python-installer.exe &&
C:\Python\python.exe -m pip install --upgrade pip &&
C:\Python\python.exe -m pip install numpy
FROM base as opencv
RUN curl -L https://www.ipench.cn/static/opencv-3.4.16-vc14_vc15.exe -o C:\TEMP\opencv-installer.exe &&
start /wait C:\TEMP\opencv-installer.exe -gm2 -y -oC:\ &&
del C:\TEMP\opencv-installer.exe
FROM builder as android
ARG ANDROID_SDK_VERSION
ARG ANDROID_NDK_VERSION
ENV OPENJDK_ZIP OpenJDK11U-jdk_x64.zip
ENV OPENJDK_SHA256 087d096032efe273d7e754a25c85d8e8cf44738a3e597ad86f55e0971acc3b8e
ENV JAVA_HOME C:\Java\jdk-11.0.13+8
RUN curl -L https://ipench.cn/static/OpenJDK11U-jdk_x64_windows_hotspot_11.0.13_8.zip -o C:\TEMP%OPENJDK_ZIP% &&
for /F %s in ('sha256sum /c/TEMP/%OPENJDK_ZIP%') do ((test "%s" = "%OPENJDK_SHA256%" || (echo %s 'Checksum Failed' && exit 1))) &&
unzip C:\TEMP%OPENJDK_ZIP% -d C:\Java && `
del C:\TEMP%OPENJDK_ZIP%
ENV COMMANDLINETOOLS_ZIP commandlinetools.zip
ENV COMMANDLINETOOLS_SHA256 f9e6f91743bcb1cc6905648ca751bc33975b0dd11b50d691c2085d025514278c
RUN curl -L https://ipench.cn/static/commandlinetools-win-7583922_latest.zip -o C:\TEMP%COMMANDLINETOOLS_ZIP% &&
for /F %s in ('sha256sum /c/TEMP/%COMMANDLINETOOLS_ZIP%') do ((test "%s" = "%COMMANDLINETOOLS_SHA256%" || (echo 'Checksum Failed' && exit 1))) &&
unzip C:\TEMP%COMMANDLINETOOLS_ZIP% -d C:\Android && `
del C:\TEMP%COMMANDLINETOOLS_ZIP%
RUN powershell -command "for($i=0;$i -lt 30;$i++) { $response += """y
n""" }; $response" | C:\Android\cmdline-tools\bin\sdkmanager --sdk_root=C:\Android --licenses &&
C:\Android\cmdline-tools\bin\sdkmanager --sdk_root=C:\Android --install
"platforms;android-%ANDROID_SDK_VERSION%"
"build-tools;30.0.3" `
"ndk;%ANDROID_NDK_VERSION%"
FROM builder
ARG ANDROID_NDK_VERSION
ENV ANDROID_HOME C:\Android
ENV ANDROID_NDK_HOME ${ANDROID_HOME}\ndk${ANDROID_NDK_VERSION}
ENV PYTHON_INSTALL_PATH=C:\Python
ENV PYTHON_BIN_PATH=${PYTHON_INSTALL_PATH}\python.exe
RUN setx path "C:\bin;%PYTHON_INSTALL_PATH%;%PYTHON_INSTALL_PATH%\Scripts;%PATH%" &&
mkdir C:\bin &&
curl -L https://ipench.cn/static/bazelisk-windows-amd64.exe -o C:\bin\bazel.exe && `
curl -L https://ipench.cn/static/nuget.exe -o C:\bin\nuget.exe
COPY --from=python C:\Python C:\Python
COPY --from=opencv C:\opencv C:\opencv
COPY --from=android C:\Android C:\Android
ENV WS_LONG_PATHS_VERSION 3.4.1
ENV WS_LONG_PATHS_BASE ndk-wsls-${WS_LONG_PATHS_VERSION}
ENV WS_LONG_PATHS_7Z ${WS_LONG_PATHS_BASE}.7z
RUN curl -L https://www.ipench.cn/static/%WS_LONG_PATHS_7Z% -o C:\TEMP%WS_LONG_PATHS_7Z% &&
bash.exe -c "7z x -o/c/TEMP /c/TEMP/${WS_LONG_PATHS_7Z}" &&
C:\TEMP%WS_LONG_PATHS_BASE%\install.bat %ANDROID_NDK_HOME% %ANDROID_HOME%
Must be run in a separated RUN command to avoid "The process cannot access the file because it is being used by another process" error
RUN del C:\TEMP%WS_LONG_PATHS_7Z% && `
rmdir /s /q C:\TEMP%WS_LONG_PATHS_BASE%
WORKDIR C:\mediapipe
COPY packages.config .
COPY .bazelrc .
COPY .bazelversion .
COPY build.py .
COPY WORKSPACE .
COPY mediapipe_api mediapipe_api
COPY third_party third_party
CMD ["cmd"]
Run Image
docker run --cpus=16 --memory=32g --mount type=bind,src=F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\Packages,dst=C:\mediapipe\Packages --mount type=bind,src=F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\Assets,dst=C:\mediapipe\Assets -it mediapipe_unity:windows
Apply a patch to bazel
Rem Run inside the container
git clone https://github.com/bazelbuild/bazel.git C:\bazel
cd C:\bazel
git checkout 5.2.0
git apply ..\mediapipe\third_party\bazel_android_fixes.diff
bazel --output_user_root=C:_bzl build --java_runtime_version=remotejdk_11 //src:bazel.exe
And then ,i got a error and can't run next CMD
Log
PS F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0> docker run --cpus=16 --memory=32g --mount type=bind,src=F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\Packages,dst=C:\mediapipe\Packages --mount type=bind,src=F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\Assets,dst=C:\mediapipe\Assets -it mediapipe_unity:windows
Microsoft Windows [Version 10.0.17763.3046]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\mediapipe>git clone https://github.com/bazelbuild/bazel.git C:\bazel
Cloning into '/c/bazel'...
remote: Enumerating objects: 622505, done.
remote: Counting objects: 100% (1199/1199), done.
remote: Compressing objects: 100% (768/768), done.
error: 4803 bytes of body are still expected.23 MiB | 63.00 KiB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
C:\mediapipe>git clone https://github.com/bazelbuild/bazel.git C:\bazel
Cloning into '/c/bazel'...
remote: Enumerating objects: 622511, done.
remote: Counting objects: 100% (1206/1206), done.
remote: Compressing objects: 100% (763/763), done.
remote: Total 622511 (delta 418), reused 1016 (delta 293), pack-reused 621305
Receiving objects: 100% (622511/622511), 842.53 MiB | 14.71 MiB/s, done.
Resolving deltas: 100% (389012/389012), done.
Updating files: 100% (9349/9349), done.
C:\mediapipe>cd C:\bazel
C:\bazel>git checkout 5.2.0
Updating files: 100% (3706/3706), done.
Note: switching to '5.2.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 2e8458b781 Release 5.2.0 (2022-06-07)
C:\bazel>git apply ..\mediapipe\third_party\bazel_android_fixes.diff
C:\bazel>bazel --output_user_root=C:_bzl build --java_runtime_version=remotejdk_11 //src:bazel.exe
2022/07/03 16:36:42 could not resolve the version 'latest' to an actual version number: unable to determine latest versi
on: could not list Bazel versions in GCS bucket: could not list GCS objects at https://www.googleapis.com/storage/v1/b/b
azel/o?delimiter=/: could not fetch https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.google
apis.com/storage/v1/b/bazel/o?delimiter=/": dial tcp 172.217.160.74:443: i/o timeout
C:\bazel>bazel --output_user_root=C:_bzl build --java_runtime_version=remotejdk_11 //src:bazel.exe
2022/07/03 19:11:25 could not resolve the version 'latest' to an actual version number: unable to determine latest versi
on: could not list Bazel versions in GCS bucket: could not list GCS objects at https://www.googleapis.com/storage/v1/b/b
azel/o?delimiter=/: could not fetch https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.google
apis.com/storage/v1/b/bazel/o?delimiter=/": read tcp 172.19.244.227:49627->172.217.160.74:443: wsarecv: An existing conn
ection was forcibly closed by the remote host.
C:\bazel>bazel --output_user_root=C:_bzl build --java_runtime_version=remotejdk_11 //src:bazel.exe
2022/07/03 19:12:02 could not resolve the version 'latest' to an actual version number: unable to determine latest versi
on: could not list Bazel versions in GCS bucket: could not list GCS objects at https://www.googleapis.com/storage/v1/b/b
azel/o?delimiter=/: could not fetch https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.google
apis.com/storage/v1/b/bazel/o?delimiter=/": dial tcp 142.251.43.10:443: i/o timeout
Additional Context
I had change the docker file, because i can't download successful the corresponding file via Shell. So i download the corresponding file to my blob services, the version or any other thing is same to source.
please help me,really very thanks.
The text was updated successfully, but these errors were encountered: