I have a question about the vGPU (Tesla K80) on the VM of Google cloud.
My laptop is Lenovo T460P equiped with below spec:
CPU: intel i7-6700HQ
RAM: 16GB
GPU: nVIDIA GTX 940M (CUDA Cores: 348)
OS: Windiws 10 Pro 64bit
OpenCV: ver3.2.0 with CUDA 8.0 support (I downloaded from http://jamesbowley.co.uk/downloads/)
The VM I created in Google Cloud contains the below spec:
CPU: vCPU x 2
RAM: 4GB
HDD: 25GB
GPU: vGPU (Tesla K80) x 1 (CUDA Cores 4992)
OS: Ubuntu 16.04 LTS 64bit
CUDA Driver: I follow the install procedure from this link: https://cloud.google.com/compute/docs/gpus/add-gpus
OpenCV: ver 3.2.0 (compile parameters:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=ON -D WITH_CUBLAS=ON -D WITH_TBB=ON -D CUDA_GENERATION=Auto -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_NVCUVID=1 -D WITH_CUFFT=ON -D WITH_EIGEN=ON -D WITH_IPP=ON )
I use opencv to train LBP cascade with 160 positive images and 800 negative images.
I use the same positive and negative samples on both above environments
Below is the parameters of opencv_createsamples and opencv_traincascade:
opencv_createsamples -info data/positive_images/positives.txt -vec data/positive_images/positives.vec -w 32 -h 32
opencv_traincascade -data classifier -vec data/positive_images/positives.vec -bg data/negative_images/negatives.txt -mode BASIC -featureType LBP -numPos 160 -numNeg 800 -minHitRate 0.998 -maxFalseAlarmRate 0.05 -w 32 -h 32 -numStages 10
However, I found that my laptop took 5 minutes around to finish the training. and the vm of Google cloud took over 20 minutes and was still in TRAINING 8-stage.
What's the matter with the vm of Google cloud ?
I thought that the vm of Google cloud should have computed faster than that of my laptop because the vm has a Tesla K80. But it actually is far slow than my laptop.
Did I miss something or do something wrong on the vm of Google cloud ?
Thanks for help.
Related
During 3 days I have been trying to install mongo BD in AWS ec2 instance, today finally managed to install it in Ubuntu, now I can't launch it in AWS environment, after numerous attempts to check the status in aws environment terminal I get errors:
What I have already tried do:
installed mongodb on Ubuntu 16.04 (Xenial)
launch mongo as a service (Ubuntu)
sudo service mongod start
sudo service mongod status
Go to AWS environment and do attempts to check if I'm connected to DB, and get errors:
sudo: mongod: command not found
mongod: unrecognized service
sudo: apt-get: command not found
bash: mongo: command not found
Please help to set my environment
I am pretty sure that Шоира is dealing not with Ubuntu OS but Amazon Linux or so.
So, if she is dealing with Community Edition version of it, the actual docs for every *nix based OS can be found here (MongoDB Docs)
And if I remember this fact correctly, AWS instances comes with Amazon Linux by default, so the documentation guide should been read for Amazon Linux (here), not Ubuntu.
To ensure that she is using Amazon Linus, she must type command grep ^NAME /etc/*release in terminal. If so, the reply should be: Amazon Linux or Amazon Linux AMI
Also, I don't know does it matter or not, but MongoDB Atlas provides also free-tier (as EC2 instance) servers in (almost) every data centers from GCP / Azure / AWS, so sometimes it's better to dealing with Cloud Service (which includes Compass and Realms by default, out of the box) instead of using the Community edition of the -raw DB, and write code and https API for it, later.
I tried to recreate the issue on an EC2 instance with Ubuntu 16.04:
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
I followed the instructions from your link:
Install MongoDB Community Edition on Ubuntu
I had no issues and was able to install mangoDB as described in the link. The mongoDB is working fine on my instance:
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: active (running) since Sun 2020-07-19 08:21:41 UTC; 8s ago
Docs: https://docs.mongodb.org/manual
Main PID: 3214 (mongod)
Tasks: 24
Memory: 69.6M
CPU: 746ms
CGroup: /system.slice/mongod.service
└─3214 /usr/bin/mongod --config /etc/mongod.conf
Thus, please double check and ensure that you follow the instructions from the link. The instructions are correct.
Also please make sure to use Ubuntu 16.04:
This means that, you are trying to connect to the mongod process running on the local host which is binded on the default port of 27017
I'm trying out CNTK on Google Colab, and Colab runs on Ubuntu 18.
However, CNTK requires OpenMPI 1.10.x, but this version of OpenMPI is only available on Ubuntu 16.
Is it possible to switch Colab to Ubuntu 16 to run CNTK?
I've searched around and around and seems not possible to use Google Colab with Ubuntu 16 by now (Oct 2019), it's the OS and fixed as Ubuntu 18.
My work-around is spawning a mini Ubuntu 16 docker with port-to-port binding and and let Colab connect to this mini server as local runtime server. Creating a Ubuntu 16 in docker coz my machine is also Ubuntu 18.
solr-5.4.0 version
My Java version
java -version
java version "1.7.0_91"
OpenJDK Runtime Environment (IcedTea 2.6.3) (7u91-2.6.3-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
I did all steps finally am getting this error
sudo service solr status
Found 1 Solr nodes:
Solr process 6003 from /var/solr/solr-8983.pid not found.
How to fix this error?
That Digital Ocean tutorial recommends Java 8 with Solr 5 and provides installation instructions using a PPA. I also found another SO question where switching to Java 8 was the resolution.
I created a fresh Ubuntu 14.04 VM using Vagrant and VirtualBox with these commands...
vagrant init ubuntu/trusty64
vagrant up
Then I followed the tutorial with Solr 5.4.0, and got the same error you did. However, my Solr logs were not deleted, so I was able to find this...
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 402653184 bytes for committing reserved memory.
My Vagrant VM had 512 MB of RAM so I doubled that to 1 GB which is recommended in the tutorial, did a vagrant reload, and Solr started working. Here is my minimal Vagrantfile...
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
end
I'm using VirtualBox 5.0.10 and Vagrant 1.8.1. I hope this works for you.
UPDATE: I just went through the tutorial again with a 32-bit Ubuntu 14.04 VM (ubuntu/trusty32 in Vagrantfile) and that also worked. So if you're on a 32-bit host or the 64-bit VM doesn't work for you, the 32-bit VM should work.
I will throw my answer in here just in case someone else spends another hour like I did.
Solr version 6.1.0 + Java 1.7 same error.
I had to upgrade to 1.8. How did I know that was the problem?
:/var/solr/logs# cat solr-8983-console.log
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/jetty/start/Main : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at ....
The 52 version means you need Java 1.8.
Upgrade Ubuntu using
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
Credit to this comment.
If I have Android phone connected via USB, how do I know the commands I can send via USB to get Information like
core temperature of the device,
version of android,
power consumption details, etc.
Can I then use ADB logs, command to interact with Android mobile. Please may i know the process apart from commands if I have to send commands via ADB.
To get information from an android device, you can always use the following tools.
Use utilities like dumpsys or getprop.
Query from /sys/ or /proc/.
Eventually all utilities, fetch information from /proc or /sys, so you can directly investigate into these.
You could use dumpsys tools to get information:
Core temperature of the device
I'm not sure, what exactly do you mean by core temperature of the device.
Temperature of Device: Note
$ adb shell cat /sys/class/thermal/thermal_zone0/temp
37
Temperature of Battery:
$ adb shell cat /sys/class/power_supply/battery/device/power_supply/battery/temp
285
or
$ adb shell dumpsys battery
Current Battery Service state:
AC powered: false
USB powered: true
Wireless powered: false
status: 2
health: 2
present: true
level: 15
scale: 100
voltage: 3768
current now: -357254
temperature: 285 # <---- Temparature.
technology: Li-ion
Version of android
$ getprop ro.build.version.release
4.4.4 #<--- Android Kitkat 4.4.4
I'm not completely sure how you can get exact information:
You could start with,
$ adb shell dumpsys power
POWER MANAGER (dumpsys power)
Power Manager State:
....
Note: Results on a Linux System.
$ acpi -t # <--- apci power utility/tool.
Thermal 0: ok, 29.8 degrees C
Thermal 1: ok, 27.8 degrees C
$ cat /sys/class/thermal/thermal_zone0/temp
27800
I want this to be executed every 50 ms ?
You could write a script with above commands, that queries every 50ms.
Set-up ADB on Windows ?
A quick Google search should help you out.
Set Up Android ADB On Windows
To make proper use of Dumpsys,
See What's the Android ADB shell "dumpsys" tool and what are its benefits?
http://android-test-tw.blogspot.in/2012/10/dumpsys-information-android-open-source.html
Getprop : Android ADB commands to get the device properties
I hope this should give you a good start.
You will get the Android device properties using getprop command.
Please go through this blog .Here I am listing some of the major ADB commands. Feel free to ask doubts regarding these commands.
I recently downloaded Tomcat 7.x as a zip. Running the version.bat gives the following:
c:\apache-tomcat-7.0.19\bin>version
Using CATALINA_BASE: "C:\apache-tomcat-7.0.19"
Using CATALINA_HOME: "c:\apache-tomcat-7.0.19"
Using CATALINA_TMPDIR: "C:\apache-tomcat-7.0.19\temp"
Using JRE_HOME: "C:\Program Files (x86)\Java\jdk1.6.0_29"
Using CLASSPATH: "c:\apache-tomcat-7.0.19\bin\bootstrap.jar;C:\apache-tomcat- 7.0.19\bin\tomcat-juli.jar"
Server version: Apache Tomcat/7.0.19
Server built: Jul 13 2011 11:32:28
Server number: 7.0.19.0
OS Name: Windows Server 2008 R2
OS Version: 6.1
Architecture: x86
JVM Version: 1.6.0_29-b11
JVM Vendor: Sun Microsystems Inc.
Since it's using the 32 bit version of JRE, is it a safe assumption the Tomcat itself is 32-bit?
In the Tomcat bin folder, there is version.bat (version.sh for linux) script. Run it to get version and architecture information. Here is example output for Tomcat 7.062 running 32 bit (x86) on Windows:
C:\KBData\Software\apache-tomcat-7.0.62\bin>version
Using CATALINA_BASE: "C:\KBData\Software\apache-tomcat-7.0.62"
Using CATALINA_HOME: "C:\KBData\Software\apache-tomcat-7.0.62"
Using CATALINA_TMPDIR: "C:\KBData\Software\apache-tomcat-7.0.62\temp"
Using JRE_HOME: "C:\Program Files (x86)\Java\jdk1.7.0_25\"
Using CLASSPATH: "C:\KBData\Software\apache-tomcat-7.0.62\bin\bootstrap.ja
r;C:\KBData\Software\apache-tomcat-7.0.62\bin\tomcat-juli.jar"
Server version: Apache Tomcat/7.0.62
Server built: May 7 2015 17:14:55 UTC
Server number: 7.0.62.0
OS Name: Windows 7
OS Version: 6.1
Architecture: x86
JVM Version: 1.7.0_25-b17
JVM Vendor: Oracle Corporation
The Windows distributions contain executables and a DLL to run Tomcat as a service. You can unzip the download & run Dependency Walker (free) or dumpbin.exe (comes with MS Visual Studio) on the executable to see which processor architecture they support.
See this question for more details: In windows,how do we identify whether a file is 64 bit or 32 bit?
Java programs aren't 32-bit or 64-bit as native programs are. They run in a virtual machine with a standard architecture. Only the JRE, which implements the virtual machine, is 32-bit or 64-bit.