Igor Moiseev Applied mathematician, Web Developer

Software that crafts itself, the AI frontier

Humans are continuing the endeavor of understanding human intelligence and on the way, the new technologies are born, one of them is information technology. Nowadays the development in the area of artificial intelligence is bringing new ideas to software engineering and enrich it with some powerful tools like deep learning. During the talk, we’ll discuss these tools, the pros, and cons of the implementation and how deep learning and symbolic representation of the problem are related. It will be touched the development and debugging cycle of the deep learning architectures with some examples.

How to fully automate a store: a Made In Italy use case

In this talk I presented the technology behind the Fully Automated Store by Checkout Technologies. The actual version of the store is a result of the work of 12 engineers that spans the areas from hardware and design to the ultimate deep learning architectures. Will be also discussed the challenges and lessons learnt during this adventure and what it means to deploy the system which has an AI engine in its core. Creation of the dataset and the invention of the specific metrics that is capable to measure the accuracy of the entire system will be discussed.

Compile OpenCV 3.4.1 in one line

At first you may need to install the dependency packages

apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    cmake \
    git \
    ssl-cert \
    ca-certificates\
    yasm \
    pkg-config \
    libswscale-dev \
    libtbb2 \
    libtbb-dev \
    libjpeg-dev \
    libpng-dev \
    libtiff-dev \
    libjasper-dev \
    libavformat-dev \
    libpq-dev \
    qtbase5-dev \
    python3.5-dev \
    python3-tk

And here is the shorthand command to run in the shell

git clone https://github.com/opencv/opencv.git && \
cd opencv; git checkout 3.4.1; cd .. && \
git clone https://github.com/opencv/opencv_contrib.git && \
cd opencv_contrib; git checkout 3.4.1; cd .. && \
cd opencv; mkdir build; cd build && \
cmake -D CMAKE_BUILD_TYPE=RELEASE \
  -D CMAKE_INSTALL_PREFIX=/usr/local \
  -D WITH_CUDA=OFF \
  -D WITH_TBB=ON \
  -D WITH_V4L=ON \
  -D WITH_QT=ON \
  -D WITH_OPENGL=ON \
  -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules .. && \
make -j`nproc` && \
make install && \
sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/opencv.conf' && \
ldconfig && \
cd / && rm -rf opencv*

The handy Dockerfile with Tensorflow 1.5 + OpenCV 3.4.1 + Python 3 at your disposal https://gist.github.com/moiseevigor/3e9b00066842c20229be47bd5429f6b1

An opinionated take-away from JSConf 2017, Verona

This is my opinionated take-away from JSConf 2017, Verona. Here bellow I’ll collect some of the most interesting slides, videos and tweets from JSDay. But at first please meet the awesome speakers

Uber with Dustin Whittle

Dustin Whittle had shown us the whole story behind the Uber platform

Lessons learned building at scale with JS at @UberEng. “Enables you to move fast, but allows for sloppy code.”

  • Latency is too high for ulta performant backed systems (99th percentile for max latency)
  • Early on it made it quick to iterate, but as the size of the team scaled the developer velocity started to slow down
    • Microservices enforce a tight interface so having static typing enables large teams to catches issues earlier. It really has an impact with 100+ devs.
  • Quick to learn, but easy to write poor quality code
    • Enables you to move fast, but allows for sloopy code

Uber uses universal javascript with React and Express.

And here is the full slides

Surviving guide with Ceph and Proxmox

After you’ve followed the familiar Proxmox Ceph Server manual youl’ll have the brand new Ceph clutser up and running, here I’m collecting the basic tasks and command you’ll need to manage Ceph cluster.

Ceph structure info

Disk structure

Ceph automatically configure and creates the block device in /dev/rbd/<pool-name>/

root@node1:~# ls -la /dev/rbd/<pool-name>/
total 0
drwxr-xr-x 2 root root 560 mar 26 15:05 .
drwxr-xr-x 3 root root  60 mar 23 13:29 ..
lrwxrwxrwx 1 root root  11 mar 26 12:39 vm-101-disk-1 -> ../../rbd0
lrwxrwxrwx 1 root root  11 mar 26 13:42 vm-102-disk-1 -> ../../rbd1
lrwxrwxrwx 1 root root  11 mar 23 19:34 vm-103-disk-1 -> ../../rbd2
lrwxrwxrwx 1 root root  11 mar 24 08:31 vm-103-disk-2 -> ../../rbd3

It is a normal block device that can be mounted in a regular way

root@node1:~# fdisk -l /dev/rbd0

Disk /dev/rbd0: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4194304 bytes / 4194304 bytes
Disklabel type: dos
Disk identifier: 0x53332713

Device      Boot    Start      End  Sectors   Size Id Type
/dev/rbd0p1 *          63 41110334 41110272  19,6G 83 Linux
/dev/rbd0p2      41110335 41929649   819315 400,1M  5 Extended
/dev/rbd0p5      41110398 41913584   803187 392,2M 82 Linux swap

so

root@node1:~# mount /dev/rbd0p1 /media
root@node1:~# df -h
Filesystem                          Size  Used Avail Use% Mounted on
/dev/rbd0p1                          20G   17G  1,4G  93% /media
root@node1:~# ls -la /media/
total 2,1G
drwxr-xr-x  24 root root 4,0K mar 23 13:43 .
drwxr-xr-x  22 root root 4,0K mar  9 18:06 ..
drwxr-xr-x   2 root root 4,0K apr 10  2012 bin
drwxr-xr-x   3 root root 4,0K ago  8  2012 boot
lrwxrwxrwx   1 root root   11 apr  9  2010 cdrom -> media/cdrom
drwxr-xr-x   2 root root 4,0K set  3  2012 dev
drwxr-xr-x 109 root root  12K mar 23 13:43 etc
drwxr-xr-x  11 root root 4,0K mag 21  2013 home
drwxr-xr-x   2 root root 4,0K ott 26  2009 initrd
...

Config files structure

Benchmarking

BLOCK WRITE 4KB

root@node1:~# /usr/bin/rados -p rbd bench -b 4096 300 write -t 32 \
  --no-cleanup -m 10.0.4.1:6789 -n client.admin --keyring \
  /etc/pve/priv/ceph.client.admin.keyring --auth_supported cephx df

Total time run:         300.015640
Total writes made:      614977
Write size:             4096
Object size:            4096
Bandwidth (MB/sec):     8.0071
Stddev Bandwidth:       3.35268
Max bandwidth (MB/sec): 11.9766
Min bandwidth (MB/sec): 0.03125
Average IOPS:           2049
Stddev IOPS:            858
Max IOPS:               3066
Min IOPS:               8
Average Latency(s):     0.0156087
Stddev Latency(s):      0.0442384
Max latency(s):         1.51347
Min latency(s):         0.00396259