Dockerized nmap shows incorrect OS versions - ruby-on-rails

I've noticed that when Nmap is dockerized it is yielding incorrect OS results. I've tried various pre-built docker images as well as one I created myself and they all show the same results.
Here are a few of the pre-built images I've tried:
https://hub.docker.com/r/instrumentisto/nmap
https://hub.docker.com/r/uzyexe/nmap/
I've run the same Nmap command with these images and using my locally installed Nmap version and here are the results (all images are using Nmap 7.80):
$ nmap -sV -O 192.168.1.1
------(locally installed nmap result - correct):
OS CPE: cpe:/o:linux:linux_kernel:2.6
OS details: Linux 2.6.8 - 2.6.30
Network Distance: 1 hop
Service Info: OS: Linux; Device: broadband router; CPE: cpe:/o:linux:linux_kernel
------(all docker image nmap results - incorrect):
OS CPE: cpe:/h:hp:jetdirect_170x cpe:/h:hp:inkjet_3000
Aggressive OS guesses: HP 170X print server or Inkjet 3000 printer (85%), HP LaserJet 4000 printer (85%), HP LaserJet 4250 printer (85%)
No exact OS matches for host (test conditions non-ideal).
Service Info: OS: Linux; Device: broadband router; CPE: cpe:/o:linux:linux_kernel
What's interesting to me is that the Service Info is actually correct across the scans, but nothing else is.
I'm trying to figure out of there is a setting/flag that I'm missing when executing the docker command. Here's what I've tried:
Setting the docker network to host (no change in result)
Setting the docker network to bridge (no change in result)
Not setting any network setting (no change in result)
I really need to get Nmap working in a docker container because it's integrated into a rails web app that I'm building utilizing the ruby-nmap gem.
Thanks!

Related

How to use vpnkit with minikube on mac

There are many question around this topic, but not the specific info I am after.
Host OS is Mac, and recently had to uninstall Docker Desktop due to their licensing change. So instead we have moved to minikube, and it is all working great with VirtualBox driver.
But ideally we would like to use the hyperkit driver, as it requires less resources than virtualbox, and is (anecdotally) faster. This also all works great until we connect to our VPN (using cisco anyconnect) and then all outbound networking from within the minikube VM stops working. e.g.
k8> minikube ssh "traceroute 8.8.8.8"
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 46 byte packets
1 host.minikube.internal (192.168.64.1) 0.154 ms 0.181 ms 0.151 ms
2 * * *
Everything else is is fine, inbound networking via ingress is all good. And maven-docker-plugin is happily creating images with the minikube docker daemon. Just nothing outbound.
So figured I'd try to work with VPNKit as I have read it is meant to address this issue. But cannot find a lot of detailed documentation, and so am struggling.
We have tried starting VPNKit with minimal config:
vpnkit --ethernet /tmp/vpkit-ethernet.socket --debug
And then attempt to start minikube, but it fails:
k8> minikube delete
🔥 Deleting "minikube" in hyperkit ...
💀 Removed all traces of the "minikube" cluster.
k8> minikube start --driver=hyperkit --hyperkit-vpnkit-sock=/tmp/vpnkit-ethernet.socket
😄 minikube v1.25.1 on Darwin 10.15.7
✨ Using the hyperkit driver based on user configuration
👍 Starting control plane node minikube in cluster minikube
🔥 Creating hyperkit VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🔥 Deleting "minikube" in hyperkit ...
🤦 StartHost failed, but will try again: creating host: create: Error creating machine: Error in driver during machine creation: hyperkit crashed! command line:
hyperkit loglevel=3 console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes random.trust_cpu=on hw_rng_model=virtio base host=minikube
🔥 Creating hyperkit VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
😿 Failed to start hyperkit VM. Running "minikube delete" may fix it: creating host: create: Error creating machine: Error in driver during machine creation: hyperkit crashed! command line:
hyperkit loglevel=3 console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes random.trust_cpu=on hw_rng_model=virtio base host=minikube
❌ Exiting due to PR_HYPERKIT_CRASHED: Failed to start host: creating host: create: Error creating machine: Error in driver during machine creation: hyperkit crashed! command line:
hyperkit loglevel=3 console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes random.trust_cpu=on hw_rng_model=virtio base host=minikube
💡 Suggestion: Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --driver
🍿 Related issues:
▪ https://github.com/kubernetes/minikube/issues/6079
▪ https://github.com/kubernetes/minikube/issues/5780
And in the vpnkit log we see:
time="2022-02-14T06:07:57Z" level=debug msg="usernet: accepted vmnet connection"
time="2022-02-14T06:07:57Z" level=warning msg="Uwt: Pipe.listen: rejected ethernet connection: EOF"
time="2022-02-14T06:08:07Z" level=debug msg="usernet: accepted vmnet connection"
time="2022-02-14T06:08:07Z" level=warning msg="Uwt: Pipe.listen: rejected ethernet connection: EOF"
So kind of implies something is not right with how I started vpnkit. Have played with IP args to ensure it all matches, but does not help.
My guess is that the --ethernet=path arg is not the right type of socket. I have seen there is also --vsock-path=path but specifying this does not appear to create the socket file like --ethernet=path does. Do I have to create this some other way?
Or are there other config options I need to mess with. e.g. I thought --gateway-forwards=path could help, but can find no documentation on file format or contents.
So, I guess two main questions:
Is what we are trying even possible? Is it the the right way to go about it? Or is it much more complicated than simply running the vpnkit command?
If we are on the right track, does anyone have experience with this, and know how to set up the socket for minikube+vpnkit+hyperkit? What args, config, or other setup is required?
And just to note: --hyperkit-vpnkit-sock=auto is not an option for us, as we do not have docker installed, and so the docker socket file does not exist.
And just in case its a version issue:
k8> minikube version
minikube version: v1.25.1
commit: 3e64b11ed75e56e4898ea85f96b2e4af0301f43d
k8> vpnkit --version
854498c13b1884d4a48d84f3569eb34681af2126
k8> hyperkit -v
hyperkit: 0.20200908
Homepage: https://github.com/docker/hyperkit
License: BSD

Docker Desktop for Windows: No hypervisor is present on this system

I am new to Docker Desktop for Windows. I am getting an error when I tried the hello world example by following this. Update
Below is the steps I followed:
1 Installed Docker for Windows, stable version
2 Both Hyper-V and Virtualization have been enabled on my Windows 10
However, error below when switch to Linux container:
An error occurred.
Hardware assisted virtualization and data execution protection must be enabled in the BIOS. See https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization-must-be-enabled
Please note the problem in this post occurs when using Windows containers. Step 3 is using Windows containers, not Linux.
3 Error below when trying out hello world
PS C:\Users\'#.lp> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
407ada6e90de: Pull complete
9c9e16cbf19f: Pull complete
2cb715c55064: Pull complete
990867d1296d: Pull complete
Digest: sha256:445b2fe9afea8b4aa0b2f27fe49dd6ad130dfe7a8fd0832be5de99625dad47cd
Status: Downloaded newer image for hello-world:latest
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container e646da0e13b5c2ba92db3ade35f6a334f9c2903efde26a78765f55f0498a86f1 encountered an error during CreateContainer: failure in a Windows system call: No hypervisor is present on this system. (0xc0351000) extra info: {"SystemType":"Container","Name":"e646da0e13b5c2ba92db3ade35f6a334f9c2903efde26a78765f55f0498a86f1","Owner":"docker","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\Docker\\windowsfilter\\e646da0e13b5c2ba92db3ade35f6a334f9c2903efde26a78765f55f0498a86f1","Layers":[{"ID":"84cbd4e4-1a6a-5e55-86fa-927ba5be73e0","Path":"C:\\ProgramData\\Docker\\windowsfilter\\417caa6a366bad6fe0d68d2b459510e4c50fda5686b37fb91c9363ca103e9475"},{"ID":"e747017d-859e-5513-b9ad-346002efc167","Path":"C:\\ProgramData\\Docker\\windowsfilter\\43e4d5eeaebc150ea9da0bf919302a2d7646461e3da60b5cbd3db15d3d928698"},{"ID":"e0bd7f8a-622c-589f-9752-eb7b80b88973","Path":"C:\\ProgramData\\Docker\\windowsfilter\\e8ee5f9ec8d67bfebe230b67989dd788506e33627a4400bb63ba098b2a3fd733"},{"ID":"6f13d213-2d8c-5c37-b1f5-770f73ad2d9a","Path":"C:\\ProgramData\\Docker\\windowsfilter\\a731844c4d933200e984524b7273ac3a555792bafec6eab30722fdfd7992ee96"}],"HostName":"e646da0e13b5","HvPartition":true,"EndpointList":["0b88e638-56ea-4157-88a7-67fc3bc35958"],"HvRuntime":{"ImagePath":"C:\\ProgramData\\Docker\\windowsfilter\\e8ee5f9ec8d67bfebe230b67989dd788506e33627a4400bb63ba098b2a3fd733\\UtilityVM"},"AllowUnqualifiedDNSQuery":true}.
System information below:
PS C:\Users\'#.lp> docker --version
Docker version 17.09.1-ce, build 19e2cf6
PS C:\Users\'#.lp> docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 17.09.1-ce
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 16299 (16299.15.amd64fre.rs3_release.170928-1534)
Operating System: Windows 10 Pro
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 7.999GiB
Name: username
ID: 5EK5:6LMU:NPZG:3K2F:W3X7:2G7T:GFYU:GENE:LDBA:UASU:ZF26:T3AU
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: -1
Goroutines: 24
System Time: 2017-12-24T20:16:32.0728521Z
EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
PS C:\Users\'#.lp> docker-compose --version
docker-compose version 1.17.1, build 6d101fb0
PS C:\Users\'#.lp> docker-machine --version
docker-machine.exe version 0.13.0, build 9ba6da9
Windows 10 Pro version 1709
Any idea?
Update:
PS C:\WINDOWS\system32> docker --version
Docker version 17.12.0-ce, build c97c6d6
PS C:\WINDOWS\system32> docker rm -f $(docker ps -a -q)
a7094c166be7
afbc956d0630
6cc2e3a20dcc
e646da0e13b5
PS C:\WINDOWS\system32> docker rmi -f $(docker images -q)
Untagged: hello-world:latest
Untagged: hello-world#sha256:445b2fe9afea8b4aa0b2f27fe49dd6ad130dfe7a8fd0832be5de99625dad47cd
Deleted: sha256:29528317da62a27024338f18abf29c992d6cdb4087f7d195cb6725bbe6bd15cc
Deleted: sha256:729a95d3f7234b02c27bdaf4fd81fd3fb9453445a85b713398c6bd05ad290ff5
Deleted: sha256:fcea8c486bda6858dee33a0ce494fba4839e542554b0588f6d00833a4155a537
Deleted: sha256:53cda6d9c060289530670af7ac429015f88d1ac58417f94f22c3dd2f03210436
Deleted: sha256:67903cf26ef4095868687002e3dc6f78ad275677704bf0d11524f16209cec48e
PS C:\WINDOWS\system32> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
407ada6e90de: Pull complete
711a33cda32c: Pull complete
f2954926b3d8: Pull complete
8b6a3aeeca73: Pull complete
Digest: sha256:66ef312bbac49c39a89aa9bcc3cb4f3c9e7de3788c944158df3ee0176d32b751
Status: Downloaded newer image for hello-world:latest
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container 99a306c2336a7bd503bfe8a744ace77cedc19bbc0d15e52b8d899bcea3db6b96 encountered an error during CreateContainer: failure in a Windows system call: No hypervisor is present on this system. (0xc0351000) extra info: {"SystemType":"Container","Name":"99a306c2336a7bd503bfe8a744ace77cedc19bbc0d15e52b8d899bcea3db6b96","Owner":"docker","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\Docker\\windowsfilter\\99a306c2336a7bd503bfe8a744ace77cedc19bbc0d15e52b8d899bcea3db6b96","Layers":[{"ID":"a5eef81d-74bf-53d1-8517-78b635324fdb","Path":"C:\\ProgramData\\Docker\\windowsfilter\\afb89f854af8452a0a12dfb14dc47995e001057c7af209be45ed5ee4813d2ffd"},{"ID":"744a6817-2b8a-5b6a-a717-8932a5863c9f","Path":"C:\\ProgramData\\Docker\\windowsfilter\\21a39c2b74ff220eac42f6f96d6097a7ef0feb192c1a77c0e88068cd10207d33"},{"ID":"ee281c98-febf-545b-bd51-8aec0a88f617","Path":"C:\\ProgramData\\Docker\\windowsfilter\\62439684561a3d30068cae2c804512984637d4c8b489f6f7cbcb5c8fed588af5"},{"ID":"f023cffb-ac18-57fe-9894-a2f1798fd0b0","Path":"C:\\ProgramData\\Docker\\windowsfilter\\1354f5a762901ec48bcf6a3ca8aab615bc305e91315e6e77fdf2c8fee5d587a2"}],"HostName":"99a306c2336a","HvPartition":true,"EndpointList":["2ce5269d-8776-4e84-8b37-4d99fa0a9f7b"],"HvRuntime":{"ImagePath":"C:\\ProgramData\\Docker\\windowsfilter\\62439684561a3d30068cae2c804512984637d4c8b489f6f7cbcb5c8fed588af5\\UtilityVM"},"AllowUnqualifiedDNSQuery":true}.
PS C:\WINDOWS\system32> systeminfo
Host Name: XXXX
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.16299 N/A Build 16299
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: '#.lp
Registered Organization:
Product ID: XXXXXXXXXXXXXXXXXXXXXXXXXXX
Original Install Date: 10/12/2017, 23:15:17
System Boot Time: 06/01/2018, 13:53:55
System Manufacturer: System manufacturer
System Model: System Product Name
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 15 Stepping 11 GenuineIntel ~2401 Mhz
BIOS Version: American Megatrends Inc. 0902 , 27/07/2011
Windows Directory: C:\WINDOWS
System Directory: C:\WINDOWS\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-gb;English (United Kingdom)
Input Locale: en-gb;English (United Kingdom)
Time Zone: (UTC+00:00) Dublin, Edinburgh, Lisbon, London
Total Physical Memory: 8,191 MB
Available Physical Memory: 2,209 MB
Virtual Memory: Max Size: 16,383 MB
Virtual Memory: Available: 4,745 MB
Virtual Memory: In Use: 11,638 MB
Page File Location(s): C:\pagefile.sys
Domain: WORKGROUP
Logon Server: \\XXXXX
Hotfix(s): 7 Hotfix(s) Installed.
[01]: KB4048951
[02]: KB4053577
[03]: KB4054022
[04]: KB4055237
[05]: KB4056887
[06]: KB4058043
[07]: KB4054517
Network Card(s): 5 NIC(s) Installed.
[01]: TunnelBear Adapter V9
Connection Name: Ethernet
Status: Media disconnected
[02]: Qualcomm Atheros AR8131 PCI-E Gigabit Ethernet Controller (NDIS 6.30)
Connection Name: Local Area Connection
Status: Media disconnected
[03]: Compact Wireless-G USB Network Adapter
Connection Name: Wi-Fi
DHCP Enabled: Yes
DHCP Server: XXXXX
IP address(es)
[01]: XXX
[02]: XXX
[04]: Hyper-V Virtual Ethernet Adapter
Connection Name: vEthernet (Default Switch)
DHCP Enabled: Yes
DHCP Server: 255.255.255.255
IP address(es)
[01]: X
[02]: X
[05]: Hyper-V Virtual Ethernet Adapter
Connection Name: vEthernet (nat)
DHCP Enabled: Yes
DHCP Server: 255.255.255.255
IP address(es)
[01]: X
[02]: X
Hyper-V Requirements: VM Monitor Mode Extensions: Yes
Virtualization Enabled In Firmware: Yes
Second Level Address Translation: No
Data Execution Prevention Available: Yes
Update 2
Still getting the same error, any idea?
PS C:\Users\'#.lp> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
e46172273a4e: Pull complete
61703422ec93: Pull complete
a17b8d9caad6: Pull complete
2dccc7619f71: Pull complete
Digest: sha256:41a65640635299bab090f783209c1e3a3f11934cf7756b09cb2f1e02147c6ed8
Status: Downloaded newer image for hello-world:latest
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: CreateComputeSystem 755110bc7813700701f2325c921fad7a4220c8ff91d620ac51e258cb8b1ab700: No hypervisor is present on this system.
(extra info: {"SystemType":"Container","Name":"755110bc7813700701f2325c921fad7a4220c8ff91d620ac51e258cb8b1ab700","Owner":"docker","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\Docker\\windowsfilter\\755110bc7813700701f2325c921fad7a4220c8ff91d620ac51e258cb8b1ab700","Layers":[{"ID":"535189fb-71a2-598a-bd98-f711c29cf301","Path":"C:\\ProgramData\\Docker\\windowsfilter\\5e4cc131c334b8171b269003b9659ba578f9528372dd28054624d0bbde003b4f"},{"ID":"93d17dd0-2837-5522-a207-2b9e009a9d2b","Path":"C:\\ProgramData\\Docker\\windowsfilter\\87d235bd8d5ca1534f7396bf90d96ee9012875f8ae0e56556af19ebce73cdf80"},{"ID":"6899fe53-2cd7-5ec6-8edc-bf8859eea3e7","Path":"C:\\ProgramData\\Docker\\windowsfilter\\f75a64ae1fe066c392738bc643e1f49f1f0ee0bce4214c8655714b7386cdc3fc"},{"ID":"efbc003d-b691-5d30-ad65-d7dff28ca9e8","Path":"C:\\ProgramData\\Docker\\windowsfilter\\74033dce6b43107101f831d96c6bebe0ceb1df34f8e5c82421ee3f296b20a70c"}],"HostName":"755110bc7813","HvPartition":true,"EndpointList":["93c1c71e-11b5-49d3-82fd-d467d9b625b6"],"HvRuntime":{"ImagePath":"C:\\ProgramData\\Docker\\windowsfilter\\f75a64ae1fe066c392738bc643e1f49f1f0ee0bce4214c8655714b7386cdc3fc\\UtilityVM"},"AllowUnqualifiedDNSQuery":true}).
PS C:\Users\'#.lp> docker --version
Docker version 18.09.2, build 6247962
PS C:\Users\'#.lp>
Here is what worked for me: Open command prompt as admin and run
bcdedit /set hypervisorlaunchtype auto
and then reboot
What had happened:
I had to start an android emulator and Android Studio said that "Emulator is incompatible With Hyper-V" so it ran this command to disable hyper-v bcdedit /set hypervisorlaunchtype off
These steps fixed it:
1. bcdedit /set hypervisorlaunchtype auto
2. reboot computer
3. docker run hello-world
if both docker and Hyper-V are installed try to recreate the image in docker. It works for me.
You can check the status of Hyper-V in system by typing the following command in powershell:
systeminfo
You should also switch to container for windows in docker if not already.
Had the same problem.
Had to enable the virtualization in the BIOS to solve it.
If you're attempting to run Docker for Windows inside a Parallels virtual machine, you must enable 'Nested Virtualization'.
https://kb.parallels.com/en/116239
This is only available in the Pro and Business Editions. I had to upgrade my version to support this as I was running Desktop.
If you are running Docker in a VM, may be you need look into "Nested Virtualization", the Virtualization need to be exposed from Physical Server to VM.
For example, expose Virtualization in Hyper-V platform throuth powershell scripts:
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
see the link:
Run Hyper-V in a Virtual Machine with Nested Virtualization
I had faced the same issue and it got resolved after upgrading my windows to latest version...
I did everything as suggested on this post and others to no avail. What did work for me was the following:
Turn Windows Features OFF : Hyper-V and Containers
Force an windows update to Windows 10 Pro ver: 1803
The update completed. Then when I started docker it asked me if I wanted to enable Hyper-V and Containers. I answered yes. The machine rebooted twice.
After this everything worked perfectly. Unfortunately I cannot say for sure if point 1 or point 2 or both together fixed the issue. I would suggest try point 1 above first followed by a reboot then starting docker. I suspect this rather than forcing a update to Windows 1803 will fix the problem.
For virtualbox users you need to enable nested virtualization
VM -> Configuration -> System -> Processor -> Enable nested VT-x/AMD-v
Run the following command on Windows Power Shell
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
if it requires a restart, then just follow the steps.
more info or options, please check docs from microsoft
Step 1:
Uninstall Docker.
Step 2:
Open "Turn windows features on or off" from Control Panel.
Uncheck both features - "Containers" and "Hyper-V", if they are checked.
Step 3:
Reboot PC
Step 4:
Check both features - "Container" and "Hyper-V".
Step 5:
Reboot PC.
Step 6:
Install docker and execute docker run hello-world
BIOS LEVEL Virtualization is a must
Hyper-V and Containers Windows features must be enabled.
The following hardware prerequisites are required to successfully run Client Hyper-V on Windows 10:
64-bit processor with Second Level Address Translation (SLAT)
4GB system RAM
BIOS-level hardware virtualization support must be enabled in the BIOS settings.
https://docs.docker.com/docker-for-windows/install/

GPU becomes unavailable when computer goes to sleep

I am using docker installation of TensorFlow .
I initiate the container using
nvidia-docker run -it -p 8888:8888 -v /*/Data/docker:/docker --name TensorFlow gcr.io/tensorflow/tensorflow:latest-gpu /bin/bash
This allows me to link a folder names "docker" in my secondary local drive with a folder inside docker container.
The issue is that whenever my computer (Ubuntu - GTX 1070 - 6700k Intel CPU) goes to sleep, the GPU becomes unavailable and code runs only on CPU. When I run the code in ipython notebook session inside docker I get:
failed call to cuInit: CUDA_ERROR_UNKNOWN.
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally
E tensorflow/stream_executor/cuda/cuda_driver.cc:491] failed call to cuInit: CUDA_ERROR_UNKNOWN
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:153] retrieving CUDA diagnostic information for host: 123456c234ds
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:160] hostname: 123456c234ds
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:185] libcuda reported version is: 367.57.0
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:356] driver version file contents: """NVRM version: NVIDIA UNIX x86_64 Kernel Module 367.57 Mon Oct 3 20:37:01 PDT 2016
GCC version: gcc version 4.9.3 (Ubuntu 4.9.3-13ubuntu2)
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] kernel reported version is: 367.57.0
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:293] kernel version seems to match DSO: 367.57.0
When i restart the computer, the GPU becomes available without the UNKNOWN message.
I have searched the Internet and the solutions such as sudo apt-get install nvidia-modprobe does not solve the issue.

mobile devices under Mac Os X to connect to Docker

I'm trying to connect to my docker instance the devices I have connected to my laptop.
Concretely I have 4 devices (two iphones, two android) and I would like to be able to start 4 docker instances and connect each device to one instance.
What I expected to do is as simply as in ubuntu
docker run --privileged -v /dev/bus/usb:/dev/bus/usb -d -P my-android:0.0.1
But my host OS is a Mac OS X, also the instances I'm creating, because I need access to the instruments tool.
but so far I read that under mac os x, devices are connected directly though usb not being mounted.
this is what I got when I search for the iphone device:
iPhone USB:
Type: Ethernet
BSD Device Name: en6
IPv4:
Configuration Method: DHCP
IPv6:
Configuration Method: Automatic
Proxies:
Exceptions List: *.local, 169.254/16
FTP Passive Mode: Yes
Do you know how can I connect the devices to the docker instances?
Thanks!!!!
I got this working with the docker-machine on virtualbox with the VirtualBox Extension Pack installed (provides support for USB 2.0 and USB 3.0 devices).
have the mobile phone connected to the host system.
$ ioreg -p IOUSB | grep SAMSUNG
+-o SAMSUNG_Android#14100000 <class AppleUSBDevice, id 0x100000c66, registered, matched, active, busy 0 (13 ms), retain 34>
create the a docker machine with the virtualbox driver (I've named it
base)
docker-machine create --driver virtualbox base
stop the machine to enable the USB Controller on the VM
docker-machine stop base
docker-machine start base
- activate the base VM as docker host
eval $(docker-machine env base)
- start ubuntu container with the usb devices mounted
docker run -it --rm -v /dev/usb/bus:/dev/bus/usb ubuntu /bin/bash
- install the usbutils just to demo with lsusb that the android device is connected
root#ce1e4be0bb73:/# apt-get update && apt-get install -y usbutils
1st run of lsusb (did not show the device)
root#ce1e4be0bb73:/# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
to show the device I had to unplug and plug again my phone, 2nd run of lsusb
root#ce1e4be0bb73:/# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Can't connect to docker process

I'm using boot2docker on windows
Docker version:
Client version: 0.12.0
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 14680bf
Server version: 0.12.0
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 14680bf
I'm basically going through the user guide, everything is working as intended but on browsing to the training flask app (http://docs.docker.com/userguide/usingdocker/) my browser can't connect to the web server.
I've tried every version of my ip address(es), host name, ... nothing. Always "can't connect".
The docker image is running fine:
8e9f917617ef training/webapp:latest python app.py 15 seconds ago
Up 14 seconds 0.0.0.0:49153->5000/tcp kickass_carson
Since this is the basic guide, I would expect all bases covered ... but perhaps something windows (or boot2docker) specific isn't mentioned. Just can't find it.
creack gave me the hint - I hadn't looked at boot2docker specifically. It has it's own ip address - typically this one:
$ boot2docker ip
192.168.59.103
So now doing http:// 192.168.59.103:49153 I got 'hello world'.
I am not sure how boot2docker works on windows, but check your VM config (within virtualbox) and make sure the ports 49000 to 50000 are forwarded to the host. You should then be able to access your flask app from http://localhost:<port>
The fact "boot2docker ip" doesn't work on windows by default is a pain
As Bjorn did, I tried on .103 and it worked, but this is pure luck....
When doing a netstat -r you see the entire address range is going to .3 , which must be the external VM address.
192.168.59.0 255.255.255.0 On-link 192.168.59.3
192.168.59.3 255.255.255.255 On-link 192.168.59.3
192.168.59.255 255.255.255.255 On-link 192.168.59.3
Finding out that the ultimate address is 103 is a challenge I couldn't solve

Resources