I'm struggling to run the same tensorflow serving docker image on two different mac computers.
Here is the dockerfile
FROM tensorflow/serving:2.6.0
RUN mkdir /models
WORKDIR /models
COPY ./ /models
EXPOSE 8080
ENTRYPOINT tensorflow_model_server --rest_api_port=8080 --model_name=MyModel --model_base_path=/models/
When I build and run this on Mac 1, it works fine.
However, on Mac 2, the following error occurs:
[libprotobuf FATAL external/com_google_protobuf/src/google/protobuf/generated_message_reflection.cc:2345] CHECK failed: file != nullptr:
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: file != nullptr:
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
Does anyone know why is happening, and how to prevent it? Thanks!
Mac 1 specs:
MacOS Monterey Version 12.5
Processor: Quad-Core Intel Core i7
Mac2 specs:
MacOS Monterey Version 12.0.1 (21A559)
Chip: Apple M1 Pro
I have not seen this error. Yet if it works with i7 and not M1, it might be because your TensorFlow serving image does not work with arm64 arch. You may need a custom build
I have found one here : build for apple's M1
but I am having difficulties myself to run it.
Edit: actually it runs now
Related
After build finishes without issue, running Xcode 12.4 project's tests fail with message:
MyProject.app (10164) encountered an error (
Early unexpected exit,
operation never finished bootstrapping - no restart will be attempted. (
Underlying Error: The test runner exited with code -1 before checking in.
If you believe this error represents a bug,
please attach the result bundle at /Users/admin/Library/Developer/Xcode/DerivedData/MyApp-gczfeuobxydqjrfbdhwzpqjsseyr/Logs/Test/Test-MyApp-2021.09.29_23-12-38-+0430.xcresult
)
)
What is above message trying to mean?!
(parenthesis spacing is by me, to make human-readable)
About My System: macOS Catalina version 10.15.7 (19H2)
MacBook Pro (13-inch, Mid 2010)
Processor 2.4 GHz Intel Core 2 Duo
Memory 4 GB 1067 MHz DDR3
Graphics NVIDIA GeForce 320M 256 MB
TK;DR; Either update MacOS to latest, or downgrade Xcode to 11.7 version.
At last I found reason, seems Xcode 11.7 (or rather it's SDK), is the last version which supports running on Catalina version of MacOS
(without any manual extra effort).
But running tests for iOS device works (without macOS update).
Someone please tell Apple to improve their error messages :-(
Here is my recently created macOS app: https://github.com/evillt/macmineable-release
and here is my facing issue: https://github.com/evillt/macmineable-release/issues/18
I built the app on my machine it can run normally on any BigSur device, even M1 devices, but can not run on Catalina(10.15).
So what I want is to build a version that can run on multi-macOS-version with a single app.
Huge thanks for any suggestions!
update
My device is MacBook Pro 2015, Intel I5 chip, Big Sur 11.5.2.
I build this app on my device, it can run normally on:
My device
MacBook 12-inch Big Sur 11.0
Other M1 devices (Big Sur 11.0 or above)
But can not run on MacBook Pro Intel I7 Catalina 10.15.7. The issue here.
That is all I know.
You need to change the CC compile go uses during your builds.
go env CC
clang
which most likely uses the version in /usr/bin/clang
if you have Xcode installed - or really just the Command Line Tools you can see a variety of versions for the last few major releases e.g.:
$ find /Library/Developer/CommandLineTools -name clang
/Library/Developer/CommandLineTools/usr/bin/clang
/Library/Developer/CommandLineTools/usr/lib/clang
/Library/Developer/CommandLineTools/usr/lib/swift/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang
so to build against an older SDK like MaxOSX10.15, set CC to the explicit version you need for your go build like so:
CC=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang go build
I have good experience building as a Unix executable and packaging as a Mac app, by using the instructions manual at
https://medium.com/#mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
build Unix exec file
go build -o bin/{program} {program}
Packaging the application on macOS (Big Sur) and installing it on macOS (High Sierra) was successful.
Followed instructions given in https://doc.omnetpp.org/omnetpp/InstallGuide.pdf
OMNeT++ Version - omnetpp-5.6.2
Device - MacBook Air M1 (MacOS Big Sur Version 11.4)
Encountered the following problems.
$. setenv -> didn't work (worked after replacing "." with "source")
$./configure -> gives the following error.
configure: error: Qtenv cannot find qmake -- maybe it is not in the PATH or has some exotic name (tested names were: qmake qmake-qt5 qmake5) - disabling Qtenv. You can try setting the QT_PATH variable in configure.user to a valid location
$ make -> gives the following error.
Makefile:54: Makefile.inc: No such file or directory
make: *** No rule to make target `Makefile.inc'. Stop.
Is it possible to get OMNeT++ working on M1 Macs? Any help would be greatly appreciated.
Thanks in advance.
There is no native support for M1 processors, especially because omnet++ 5.6 was released way before the M1 release, but you can run omnet with Rosetta2 in x86_64 mode. You would still get pretty decent performance. With x86_64 emulation I measured similar performance like on my last year high end AMD laptop. Native mode would give you a 25% boost compared to that.
To turn on the emulation for a shell window, start a new shell with
$ arch -x86_64 /bin/zsh --login
and then continue in that shell with
$ source setenv
$ ./configure
$ make
run everything from that shell window (as usual).
NOTE: OMNeT++ 5.6 relies on the system-wide installed JRE to run the IDE. That may NOT be present on your system if you are running on ARM. OMNeT++ 6 and 5.7 comes with a built-in private JRE, so the IDE should work with those versions also in intel emulation mode.
ps: OMNeT++ 6 may get native M1 support (this depends on the availability of some dependencies (JavaVM, Qt etc.). I'm also considering an ARM based docker image, that would allow running at native performance (as long as you have an XServer installed).
I am trying to open a VTK render on a local machine through ssh. I am using pyvista to make the render, which is being run from a python script on a remote machine.
Local machine (where I want to see the render): MacOS Catalina 10.15
Remote machine: Ubuntu 18.04
To run the script I first ssh into the remote machine and then run, i.e.
ssh -Y <username>#remotehost.com
python script.py
However when I run this I get the following error:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
ERROR:root:GL version 2.1 with the gpu_shader4 extension is not supported by your
graphics driver but is required for the new OpenGL rendering backend. Please update
your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5
or later and make sure your driver in Mesa supports OpenGL 3.2.
[1] 21692 segmentation fault (core dumped) python script.py
Based on several posts online I have tried the following setting:
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
On MacOS I have installed mesa==20.0.2 and mesalib-glw==8.0.0
The issue appears to be that MacOS is using OpenGL==2.1, but should instead be using version 3.2+. This is confirmed with I run:
$ glxinfo|grep OpenGL
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: AMD Radeon Pro 560X OpenGL Engine
OpenGL version string: 2.1 ATI-3.8.24
OpenGL shading language version string: 1.20
OpenGL extensions:
How can I get MacOS to run the VTK window over ssh? I The script runs fine if I run it locally. Also, it runs fine if I run it on the remote only. It's only when I try to run it remotely and view in locally I have this issue. Is it a matter of either changing the default OpenGL version or upgrading somehow?
I solved this using VirtualGL.
VirtualGL server works for Ubuntu 18.04 and VirtualGL client for MacOS Catalina (10.15.4).
I am using appdmg https://www.npmjs.com/package/appdmg to create dmg.
In OSX 10.15 it is failing quite often, I get the following error
Error: Command failed: hdiutil detach /Volumes/MyAppName
hdiutil: couldn't unmount "disk2" - Resource busy
What should I do to fix this?