Trying to build tensorflow for a Ubuntu VPS - node.js

I've been developing a Nodejs app using face-api.js that depends on #tensorflow/tfjs-node. So far everything was working well on my windows local machine and on Heroku server. But after I pushed the app to a Ubuntu VPS server the app won't run, whenever I write either
var tensor = require('#tensorflow/tfjs-node');
or
var faceapi = require('#vladmandic/face-api');
The console prints "Illegal instruction" and that's it, no trace or anything. I figured maybe tensorflow is not compatible with the server system/hardware. I read that I can build tensorflow using bazel, which I tried but the server runs out of memory before the build completes. Someone told me that I can build tensorflow on my windows local machine. I tried and failed... I don't know what configurations I should use. Is there is a way to make tensorflow work on the VPS? Or successfully build one?
VPS information (I got it from NameCheap, Pulsar VPS):
Processor information: QEMU Virtual CPU version 2.5+, 2 cores
RAM: 2 GB
Operating system: Ubuntu Linux 20.04
Kernel and CPU: Linux 5.4.0-81-generic on x86_64
Storage: 40 GB

Related

Is it possible to install nodejs on ubuntu server 20.04 on a virtual machine?

I'm having trouble installing NodeJs and NPM on Ubuntu Server 20.04 on a Virtual Machine. The "unpacking" process takes forever and I don't remember it taking a long time when installing it on my physical computer (running on Ubuntu Desktop 20.04). I want to know if it is possible or why is it taking too long? Are the system requirements for my vm a problem?
Thank you in advance
To answer this it would be good to have more details. Which package are you trying to install? What are the specs of your vm?
Also I think this should belong in the Linux & Unix Stackexchange.

Running windows container on linux host

I installed docker CE on an Ubuntu 16.04, and when I try:
docker pull microsoft/windowsservercore
It fails:
Using default tag: latest
latest: Pulling from microsoft/windowsservercore
3889bb8d808b: Pulling fs layer
da87b55a9b63: Pulling fs layer
image operating system "windows" cannot be used on this platform
Is it possible to run a windows image on a linux host with docker? If yes, how should I do that?
Unlike other Virtual computing systems like Virtual Box or VMWare, Docker images are small and not fully complete stand alone entities.
The Docker image does not include the OS kernel, instead it uses the kernel of the Docker host
This makes the images very light weight, but it also means you won't be able to run a Windows image on a Linux host.

Booting a raw file of cloned aws instance on KVM

I am trying to boot a cloned image on KVM ,which is in the raw format, the image is a clone of aws ubuntu 14.04 LTS hvm instance. It gives me an error saying no bootable device found. The same image boots up when I specify the kernel path explicitly while creating the VM.
I am using virt-manager to create the VM and the qemu version is 2.0.0
I have tried changing the disk bus but nothing helped.
Can anyone help ?
It was because of the partitions on the Ubuntu 14.04 LTS. Cloned the entire disk. Boots up fine now.

How to update/check the ubuntu kernel configuration?

I am new to Linux, and currently I want to try Kubernetes in my laptop. The official tutorial says
You need to have docker installed on one machine.
Your kernel should support memory and swap accounting. Ensure that the following configs are turned on in your linux kernel:
CONFIG_RESOURCE_COUNTERS=y
CONFIG_MEMCG=y
CONFIG_MEMCG_SWAP=y
CONFIG_MEMCG_SWAP_ENABLED=y
CONFIG_MEMCG_KMEM=y
I just installed Ubuntu 14.04, and I dont know whether the above configs are already turned on or not, how to check them? and if some are still off, how to turn them on?

Problems running MPI (OpenMPI) app on Linux on ARM

I am trying to follow this tutorial for building and running an MPI application on an ARM based Ubuntu 11.10 system.
When installing open-mpi environment on my PC machine, the sample program runs well. However, trying the same on the ARM machine, the terminal hangs up and I need to kill the MPI process from a second terminal in order to release it.
The MPI packages I installed using apt-get, on both machines, were mpi-default-dev and mpi-default-bin, so I assume that the packages are as updated as they can be.
The first sample program in the tutorial makes every process prints a "hello" message with some info. On the PC I get messages from all 8 processes (although running on a single core) and then the program ends. On the ARM, I get no output at all. The program is just stuck immediately after launch.
Any idea on what's wrong? I am not sure even where to start to debug this?
Update: I tried removing the OpenMPI package and install the alternative MPICH2 package - but the result is just the same.
Ubuntu 11.10 did not ship with a functional Open MPI implementation for ARM (although it may have shipped with a nonfunctional one). Ubuntu 12.04 did.
I would recommend building your own Open MPI from source - available at http://www.open-mpi.org/software/ompi/v1.6/, unless you can update to a more recent version of Ubuntu.
Alternatively, you could rebuild the 11.10 package using the fixes pointed out in https://bugs.launchpad.net/ubuntu/+source/openmpi/+bug/949044.

Resources