Can I build libpostal on one machine and transfer the binaries to another? - compilation

I'm trying to build libpostal on a Digital Ocean machine. The machine has 1Gb RAM, and this seems to make the build impossible (gcc gets killed).
Is it possible to build libpostal on another machine (also Digital Ocean), and then transfer the binaries? and how would that be done?
Does the data directory (datadir in the configure step) also need to be transferred?

why don't you try the docker, which will relieve you from all these things, OS independent.
https://github.com/johnlonganecker/libpostal-rest-docker
I am using the docker and use the REST api to hit the parser

Related

Does docker on windows use a windows virtual machine to create a windows container?

The software I build is written for windows and built on windows.
Right now I am in the process of finding a solution to isolate my build environments.
I am comparing two options - using virtual machines and using containers. I am also considering the issue of performance.
Unfortunately windows docker containers can only be run from windows.
Do windows containers run faster than windows virtual machines?
Does docker on windows use a virtual machine to host a windows container?
It completely depends on what you are trying to accomplish. Containerization and Virtualization have a lot in common but have different architectural designs. So you should rather try to invest some time and think about the things you want to do. Or you should specify your question and tell us what your main goal is.
Maybe you should check out this https://www.ibm.com/cloud/blog/containers-vs-vms and this https://www.edureka.co/blog/docker-for-windows/

How to have a source code and IDE on local laptop and run it on another machine inside the docker container?

I'm using an "old" MacBook Pro 2015 with "just" 16GB of RAM for developing some complex websites based on Drupal. As a tool stack, I'm using Docksal (a Docker-based env) and PHPStorm as an IDE.
Because the Drupal site is complex it eats up almost all my memory and the NFS sharing is also very slow. I have another machine (an old Mac Mini) with 16GB of RAM. My idea is to have the code and IDE on my laptop and run the heavy Docker on a second machine.
I found the Docker Context tool and I've configured it to connect to the Docker host on the second machine, so now I can run docker commands on my laptop and they will be executed on the second machine.
But I'm still missing the last part of the puzzle - how can I configure Docker and Docksal to sync my code from the laptop to the Docker image on another machine? Is it possible at all?
Also, I found a Mutagen.io but it is not supported in Docksal and it's not clear how to combine everything together.

Too little RAM in Kaa Server

I want to run a test with KAA, so I was trying to install the sandbox in my laptop but it has only 4GB in RAM, so when I try to set up the Virtual Machine the system won't let me set up over 1,6GB and the VM won't start.
So I was trying to install in other old laptop so I installed Ubuntu 16,04 and I followed all the step by step instructions in Kaaproyect's WEB. I could do it, but when I try to start the server can't do it. I was checking the Log error and say me that the problem is in the Java's Virtual machine, can't start because only have 2GB in RAM. I need to test a Little application so is it possible change this requirement in the Java machine and start the system?
PS: I can't buy more Ram.
I recommend you to use amazon AWS. The basic installation where you can run Kaa is free for one year, and it runs quite well there.

How to create a redistributable self contained binary distribution of a VM with VirtualBox?

Is it possible to create a self contained binary distribution of a VM with VirtualBox or some other tool?
My requirements:
no VirtualBox install
self contained binary/-ies to start and stop VM (with all VirtualBox environment support on it)
possibly no administrator rights to start and stop the VM
at least windows, but better if cross platform
In theory it is possible to create a giant blob that bundles some kind of hypervisor which will first extract install along with the VM (disk, config. etc.) and then run itself and the extracted VM.
However, that is only theory. In practice, hypervisors are very complex pieces of software and require some sort of ring-0 access (kernel level) to talk directly with the CPU and other hardware and VirtualBox is no exception. So installing them, on any operating system that cares even a little bit about security, will require admin/root/supervisor access as you cannot install drivers and other kernel components otherwise.
If performance is of no concern, it may be possible to use an emulator like Qemu/Bochs which can work without ring-0 access. However, I'm not currently aware of any projects that have such self-extracting and runnable emulators for pre-baked VM images (even more so on Windows).
As Tekn0 writes, it is required a low level access to the host OS layer.
I found the project Portable VirtualBox which setups the host machine on the fly.
I tested it and it is not enough satisfactory. From the site:
Note
VirtualBox needs several kernel drivers installed and needs to start
several services: if the drivers and services are not already
installed you’ll need administrator rights to run Portable-VirtualBox.
When Portable-VirtualBox starts, it checks to see if the drivers are
installed. If they are not it will install them before running
VirtualBox and will remove them afterward. Similarly,
Portable-VirtualBox checks to see if the services are running. If not,
it will start them and then stop them when it exits.
The result is a product not always running and with strange kernel errors.
There is another project (starting from Tekn0 observations) Kquemu Portable
and finally Bochs.

Linux kernel on virtual machine

I am studying Linux driver programming and in it, it is recommended that I work on self-compiled Linux kernels and not any distributions. I have tried compiling Linux 2.6.9 in ubuntu but the process returns errors in 'make menuconfig' stage.
I would prefer to work with Linux in a virtual environment so that I can fearlessly experiment with the kernel. So, is there any way I can compile and run Linux in a virtual machine (say VMware installed on Windows)? I can use live CDs for the purpose of compiling the kernel.
So in short, please suggest, how can I compile, install and run Linux kernel in a virtual machine in an error-free way?
I searched and read this. But after following these steps when I restarted my computer there was no separate Linux 3.2.17 OS. But my ubuntu 12.04 was now showing 3.2.17 kernel. Although this is the first time I could compile a whole kernel on ubuntu without any error, I want to load that kernel on other partition and use it as an independent OS. So, if anyone can tell, what to do in addition to the steps in the tutorial so that I can achieve this?
The simplest thing to do is probably to install some Linux distribution on a VM, such as VMWare or VirtualBox, and continue from there. You could try using a live-cd, but I'm guessing that the lack of persistent storage might get irritating. There are, of course, ways around that, but installing some distribution is probably simpler, and you don't really need that much disk space for it if all you want to do is compile a kernel.
If all you want to do is compile a kernel module, and if you already have some pre-installed Linux environment, you should also note that modern Linux installations allow you to compile modules without the need to re-compile the entire kernel. You will need the kernel source and headers, though. See, for example, this document.
And BTW, speaking of modern kernels, why did you choose to use 2.6.9? It's almost 8 years old by now. Newer kernels might actually be easier to develop for. Also, there's no guarantee that
modules developed with such an old kernel would still work with current ones.
I suggest you to read this page. This document shows you how to boot your personal kernel on qemu and how to use the debugger on it.
Kernelnewbies is the right place to start kernel hacking. This website contains a set of rich tutorials about kernel hacking and tweaking just for newbie Linux developers. Also, you can join the community and start contributing to some tiny Linux projects.
For a quick start, follow the instruction from the "kernel first patch" tutorial. Since you're cloning the "origin" remote repository in this tutorial, you'll work on the latest branches of Linux kernel. So, there's no need to worry about working on an old version of Linux. Meanwhile, if you're not comfortable working with git trees, you can always download the latest version of Linux from front page of "kernel.org".

Resources