January 29, 2021

[Note] add Anaconda to Win10 Terminal

From: https://dev.to/azure/easily-add-anaconda-prompt-in-windows-terminal-to-make-life-better-3p6j

Open settings from Terminal and add following:

        "commandline""cmd.exe /K C:\\Users\\kkim\\Anaconda3\\Scripts\\activate.bat",

Just change the user name (e.g "kkim") with yours.

January 24, 2021

Fira Code



Check the latest on https://github.com/tonsky/FiraCode


Windows 10

Settings -> Font -> drop the font files


$ sudo apt install fonts-firacode

VSC (Visual Studio Code)

Open settings.json and add/update:

"editor.fontFamily": "'Fira Code'",
"editor.fontLigatures" : true,
"editor.fontSize": 15,

(was: "editor.fontFamily": "'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",

Preview Font

Programming Fonts Test Drive, https://www.programmingfonts.org/


January 12, 2021

[Note] GNOME shell gets slower

System: Ubuntu 20.04

GNOME gets slower as I leave the computer on for more than a few days and keep using it -- drop down menu gets affected especially slow.  Seems like some menus are ok though.  And overall computer performance gets slower also.

Login out-back in makes little better, but not so much.  Eventually GUI becomes unusable and have to restart.

I did some googling and seems it is a known issue but happens to others in different situations.

There is no fix for this yet.  

If that happens, the remedy is restarting gnome-shell.  

ALT-F2 and then type "r".






[Note] Set CPU to max for Ubuntu 20.04

Objetive: Set CPU speed to max


Setting CPU performance is not working properly in Ubuntu 20.04 for old Xeon (max 3GHz).  Trying to set it to MAX all the time.


Checking current setting:

$ more /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor


Changing setting manually:

$ sudo -i
$ echo "performance" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

However, this setting will revert after reboot.

Step 1. Changing in BIOS

For my PC (Dell workstation), SpeedStep can be disabled in BIOS.

After reboot, the CPU speed still fluctuate.

Step 2. change boot option in grub

$ sudo vi /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="intel_idle.max_cstate=0 processor.max_cstate=1 pcie_aspm=off quiet splash"

Step 3. disable 'ondemand'

$ systemctl is-enabled ondemand
$ systemctl disable ondemand

and reboot.


January 11, 2021

[Note] sonatype-nexus in Docker


1. Create data folder

$ mkdir /data/docker.data/nexus && chown -R 200 /data/docker.data/nexus

2. Map the data folder and create container

$ docker run -d -p 8088:8081 --name nexus -v /data/docker.data/nexus:/nexus-data sonatype/nexus3

Wait about 3 min.  


Set up Nexus

1. admin password is in <data folder>/nexus/admin.password

$ more /data/docker.data/nexus/admin.password 

2. Open http://localhost:8088, ID=admin and PW=from previous step

3. Update password, create user, create repository.


Set up .m2/settings.xml:

      <password>*USER PASSOWRD SET IN NEXUS*</password>

Deploy JAR.  "repositoryId=" must match with server id from above settings.xml:

$ mvn deploy:deploy-file \
    -DgroupId=com.keithkim.test \
    -DartifactId=test-module \
    -Dversion=1.0.0 \
    -DgeneratePom=true \
    -Dpackaging=jar \
    -DrepositoryId=test \
    -Durl=http://localhost:8088/repository/keithkim/jars \

If you get build failure like this:

[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.163 s
[INFO] Finished at: 2021-01-11T01:53:52-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (default-cli) on project standalone-pom: Failed to deploy metadata: Could not transfer metadata com.keithkim.test:test-module/maven-metadata.xml from/to test (http://localhost:8088/repository/keithkim/jars): Transfer failed for http://localhost:8088/repository/keithkim/jars/com/keithkim/test/test-module/maven-metadata.xml 400 Bad Request -> [Help 1]

Edit this file, <DATA DIR>/etc/nexus.properties

$ vi /data/docker.data/nexus/etc/nexus.properties

Add this line:


Restart the container and try again.

January 7, 2021

[Note] CUDA reinstall with Ubuntu 20.04 and Nvidia driver 455.45.01

After upgrading Nvidia driver to 455, tensorflow-gpu stopped working and this is a note on reinstallling all the necessary s/w.


  • Xeon CPU with AVX, no BMI2
  • Ubuntu 20.04
  • Nvidia Driver 455
  • Quadro P2000 (compute capabilities=5.2)


What didn't work

I thought this may be an opportunity to upgrade CUDA, tenssrflow and everything else but learned it's not that simple for my PC.

Tried CUDA 11.1 + Tensorflow 2.4 = This requires CPU supporting BMI2 instructions.  Otherwise need to compile TF2.4 myself.

Downgrading the driver to 450, 440 with CUDA 10.2 (or 10.1) + TF 2.2.0 = after reboot, driver is back to 455.  Not working.

What worked 

Driver v455 + CUDA 10.2 + TF 2.2.0

And the installation was pretty simple:

1. Install v455 driver

2. Install CUDA, $ sudo apt-get install nvidia-cuda-toolkit

$ conda create -n tf python=3.7.9
$ conda activate tf
$ conda install tensorflow-gpu=1.5.0 keras


$ conda create -n tf2 python=3.7.9
$ conda activate tf2
$ conda install tensorflow-gpu=2.2.0 keras

Step #2 will install CUDA 10.2.


Install Jupyter

$ conda install jupyter
$ conda install -c conda-forge jupyter_nbextensions_configurator jupyter_contrib_nbextensions

$ jupyter nbextensions_configurator enable --user

When run Jupyter, noticed a lot of error messages like this:

Config option `template_path` not recognized by `ExporterCollapsibleHeadings`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?

This can be fixed by downgrading nbconvert from 6.0.7 to 5.6.1:

$ conda install nbconvert=5.6.1

But Jupyter extension is still broken.  Nbextentions tab does not appear.  File->Edit-> nbextensions, I get this error:

404 GET /static/notebook/js/mathjaxutils.js?v=2021010720231

To fix this,

1. Go to conda envs directory.  e.g. $ cd ~/anaconda3/envs/tf

2. $ vi ./lib/python3.7/site-packages/jupyter_nbextensions_configurator/static/nbextensions_configurator/render/render.js

3. change 'notebook/js/mathjaxutils' to 'base/js/mathjaxutils'



Helpful Commands

$ lscpu | grep -i bmi2

$ sudo lshw -C display

$ sudo ubuntu-drivers devices