connect MATLAB with drive? - docker

I'm tryint to run some scripts of DeepLearning in Matlab in a docker container in a DGX and I would like also to have access to my Google Drive from the container. I did this in python enviroment by using Gshell package, how ever i cant find the way to install it in Matlab enviroment (docker). Is it any way similar to Gshell or g
Gdown for liking my google drive to my Matlab docker container? I would like to do file exchanging (huge amount of images) from one to another. If not, how can I do files exchanging with my local PC (I'm using MacOS)?

Related

Containerized applications execute local script?

I'm trying to self hosted videos with nginx using nginx-rtmp-module (VOD) similar to youtube.
I successfully hosted videos by using ffmpeg to convert mp4 file to dash chunks.
I want my site can
upload video
Containerized golang app save file to local
run ffmpeg script to convert to dash chunks
How can I handle the third step ?
Is there a better way to make a VOD self hosted service ?
I run /usr/bin/ffmpeg but output not found
That is because the executable ffmpeg mounted from the host would depend on dynamic libraries either not present in the Docker image, or not at the right version (see ldd or lddtree for analysis)
It is better to build a dedicated image with the right tools installed in it rather than relying on the host content for program execution.

How to move Docker data in WSL2 to a different drive

I'm completely new to docker and ddev and I have just started learning things. My main purpose to use Docker & Ddev is to work on my CMS projects. However, I noticed that by default the docker gets installed in C drive (in my case its almost full). Therefore, I want to learn how to create my projects in D drive using DDEV.
For example I would like to have them organized in one single folder like
D://Myprojects\Drupalsites\Mysite1
Something like that.
How do I do that?
Your problem isn't DDEV and your projects, it's docker using up your space, at at least as far as I understand your question.
So what you're really wanting to do is to move your Docker WSL2 data distro over to the new drive. As far as I know Docker and WSL2 don't provide a simple way to do this, but these two links will tell you how you can do it.
https://dev.to/kimcuonthenet/move-docker-desktop-data-distro-out-of-system-drive-4cg2
How can I change the location of docker images when using Docker Desktop on WSL2 with Windows 10 Home?
I have not tried this.
One note though: Most people these days are doing the recommended thing and running DDEV inside WSL2 (in /home/<youruser>). But if you already have trouble with disk space with WSL2, you're going to have trouble with that as well. But WSL2 should be your future, see https://ddev.readthedocs.io/en/stable/#installation-or-upgrade-windows-wsl2

How to run virus scanner script from host machine from Docker container

I've got a java program where user can upload photos etc. It is running on docker container in Linux. I can have a plenty of containers and I don't want to pay many licenses to Mcafee, so is there a good solution for executing uvscan on host machine and scan uploaded files and buy only one license instead of 30?
I don't know if it's the best practice but you can mount all your photos folder and scan on the host.
One way is to mount files to host directory and perform scan.
There is a blog which explains scanning malicious files, but it uses Linux Malware Detection (LMD) and CalmAV, go through if it helpful
https://www.linkedin.com/pulse/virus-malware-scanning-service-docker-dietrich-rordorf

what should be packed as a docker image?

I just get started with docker.
I'm really confused what should be packed as a docker image?
In docker hub, I can find a complete OS as a docker image: ubuntu, centos...
as well as popular platform and database like: nodejs, mongodb...
It seems to me docker hub is just like a software repository.
should everything be packed as an image? how about just a command line tool like: ls, cd, git??? they are also software, what is qualified to be a docker image??
please help clarify
Docker will provide some isolation between the programs in the image, and your host environment. In a docker image, one may package anything from a single binary, to a full environment (everything but the linux kernel).
See it as a convenience. It provides a convenient form to deploy programs that require a complex environment that may conflict with the programs installed on the host. For instance, if you're trying to package a webapp (e.g. some blog software), the docker container will allow you to ship your application code, along with a tested version of its interpreter (php, python, etc), a compatible webserver, and maybe a database environment -- together. From the perspective of the user installing your container/app, nothing else than the container is needed to run the app. It's all self-contained, and it's simpler than setting up a virtual machine.
If your binaries in the image depend on an ls command, then you'd include that as well. Generally, in the image, you include a binary (the entry point), as well as all its dependencies.
If you're familiar with chroots, you may see a docker image as a fancy chroot where the network, and process address space are also isolated, in addition to the file system.
You can think of dockerhub as an app-store.

Convert Docker image to Google Compute Engine VM image

I have a Docker image (in Ubuntu 14.04 environment) that I want to upload to Google Compute Engine and run as a Compute Engine (not App Engine) instance.
There is a presentation (by Google's Marc Cohen) about how to do this but it leaves out key steps (on page 34) about how to convert the Docker image to raw tar.gz format.
Can someone tell me the exact steps to
convert Docker image to correct format
upload to google storage
create google compute engine image
start google compute engine instance
If you are not bound to your Ubuntu image, then you could just use the ready made VMs with Docker support (Debian Wheezy) and drop your containers in.
For more info on using Docker on GCE, see:
Container-optimized Google Compute Engine images
Containers on Google Cloud Platform
The documentation on packaging has comprehensive steps to do all what you have enumerated.
There are some specific requirements that your install must include in order for it to be compatible with GCE; its a long list of kernel compatibility flags, disk types, NTP settings, etc. etc. so copy-pasting it here will not be prudent as this information is likely to change as GCE is updated by Google.

Resources