Missing control panel icons - jupyter-notebook

After installing pip install jupyterlab_scheduler, these icons disappeared:
enter image description here
How to return?
I ran jupiter with dockerfile
FROM jupyter/scipy-notebook:latest
# Switch to root user to install cron
USER root
RUN apt-get update && apt-get upgrade -y && apt-get install --yes cron
# Switch back to Jupyter user
USER $NB_USER
RUN fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER
# Set USER to the env variable jupyter uses for the default account
ENV USER=$NB_USER
RUN pip install jupyterlab_scheduler
RUN jupyter labextension install jupyterlab_scheduler #jupyter lab build

Related

Airflow on Docker: How to update git version from 2.20 to atleast 2.25 when creating a DBT package

I set up an airflow environment (on Docker platform) an year back. I am not in a position to upgrade to latest airflow version.
Customer is trying to create a dbt package (essentially a git repo) and link to it within dbt.
Error message: Please update your git version to pull a dbt package from a sub directory: your version is 2.20.1, >= 2.25.0 needed.
How to upgrade git version?
I can share my Dockerfile
FROM apache/airflow:2.2.4-python3.9
RUN pip install "apache-airflow-providers-microsoft-mssql" "apache-airflow-providers-snowflake" "authlib" "Flask-OpenID"
USER root
RUN apt-get update
&& apt-get install -y git libpq-dev python-dev python3-pip
&& apt-get remove python-cffi
RUN pip install --upgrade cffi
RUN pip install cryptography~=3.4
USER airflow
RUN pip install airflow-dbt-python
RUN pip install dbt-sqlserver==1.0.0
RUN pip install dbt-snowflake==1.0.0
RUN dbt --version

Permision denied for dotnet

I recently installed dotnet 5.0 on Pop OS but whenever I try to use it it says that I don't have permission.
For example, if I just try to run the command dotnet it gives the the message
cannot snap-exec: cannot exec "/snap/dotnet-sdk/144/snap/command-chain/snapcraft-runner": permission denied
When I run the command as the root user it works perfectly fine.
I don't know if this is because I installed dotnet as a snap package
I had the same issue and unfortunately the dotnet issue page was not working.
To fix this issue I had to install the package with apt instead of snap.
sudo snap remove dotnet-sdk // if needed
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt install apt-transport-https
sudo apt-get install -y dotnet-sdk-5.0
Remove snap first
sudo snap remove dotnet-sdk
Manually download Dotnet SDK https://dotnet.microsoft.com/en-us/download/dotnet/6.0
When your download completes, open the terminal and run the following commands to extract the SDK to make the commands available at the terminal.
mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-6.0.101-linux-x64.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
one last thing
Edit shell profile to permanently

How to build Dockerfile with R & Java

I'm trying to build a Docker container that runs R with the package RJava. I have tried the following code:
# Install R version 3.6.3
FROM rocker/tidyverse:3.6.3
# Make ~/.R
RUN mkdir -p $HOME/.R
# Install Ubuntu packages && then R packages
RUN install2.r --error \
lubridate magrittr RPostgres DBI broom rlang rJava
However I get the following: installation of package ‘rJava’ had non-zero exit status.
Can anyone help me with this. I'm thinking that maybe it is because Java is not installed. Does anyone know how to install Java on this docker container?
I've tried adding the following to my dockerfile as per another post I found however I get the error saying 'The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu focal Release' does not have a Release file:
# Install "software-properties-common" (for the "add-apt-repository")
RUN apt-get update && apt-get install -y \
software-properties-common
# Add the "JAVA" ppa
RUN add-apt-repository -y \
ppa:webupd8team/java
# Install OpenJDK-8
RUN apt-get update && \
apt-get install -y openjdk-8-jdk && \
apt-get install -y ant && \
apt-get clean;
# Fix certificate issues
RUN apt-get update && \
apt-get install ca-certificates-java && \
apt-get clean && \
update-ca-certificates -f;
# Setup JAVA_HOME -- useful for docker commandline
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
RUN export JAVA_HOME
I'm new to docker and any help with this would be much appreciated.
The rocker images are based on debian, not ubuntu. Specifically it is Debian GNU/Linux 10 (buster). With that version, you can install java by installing the package openjdk-11-jdk via apt and you don't need to add any repositories for openjdk-8-jdk.
So a working dockerfile that installs rJava:
FROM rocker/tidyverse:3.6.3
RUN apt-get update && \
apt-get install -y openjdk-11-jdk && \
apt-get install -y liblzma-dev && \
apt-get install -y libbz2-dev
RUN Rscript -e "install.packages('rJava')"
Note: liblzma-dev and libbz2-dev are additional system dependencies for compiling rJava.

jupyter lab (not pip installed but GitHub code) not loading icons when opened via docker

I am trying to load JupyterLab (by building the GitHub source code and not installing it using 'pip'), by opening it via a docker container, but it is not loading the icons which are accessed by css variables (e.g. :- background_image = var(--jp-terminal)). To be precise only the python icons for 'Notebook' and 'Console' are loading because they are loaded by html tags. The rest are loaded by variables as mentioned before.
My current directory looks like this :-
bin docker jupyterlab
The 'bin' folder contains the 'run.sh' file, the 'docker' folder contains the 'Dockerfile' and the 'jupyter lab' folder contains the source code and files for jupyter lab taken from GitHub.
Here is my Dockerfile :-
FROM centos:latest
RUN yum -y install epel-release \
yum -y install python-devel.x86_64 python27-python-devel.x86_64 gcc \
yum -y install nodejs \
yum -y install python-pip \
yum -y install sudo
RUN pip install --upgrade setuptools pip
RUN yum -y update
COPY jupyterlab /jupyterlab
RUN cd /jupyterlab && pip install -e . && jlpm install && jlpm run build && jlpm run build:core && jupyter lab build
COPY bin/run.sh /run.sh RUN chmod +x /run.sh
EXPOSE 8888
ENTRYPOINT ["/bin/sh", "/run.sh"]
Here is the 'run.sh' file which is used as entrypoint :-
jupyter notebook --generate-config
mkdir -p -m 700 /home/jupyter/.jupyter/ && echo "c.NotebookApp.token = ''" >> /home/jupyter/.jupyter/jupyter_notebook_config.py
jupyter lab --ip=* --no-browser --allow-root
Any suggestions?

Troubles with "make" command to install R-3.2.1

I tried to install the R-3.2.1 in my Ubuntu 14.04.2 LTS, but I had troubles with "make" command. How can I install in a better way?
Thanks
The easiest way is via launchpad:
sudo add-apt-repository -y ppa:marutter/rrutter
sudo apt-get update
sudo apt-get install -y r-base
Avoid this dependency resolving issues...simple way to install R in Ubuntu is as below:
load the text file /etc/apt/sources.list in your editor. You must have root privileges, though because it is a system file.
First open a terminal (Applications - Accessories - terminal).
Then open /etc/apt/sources.list with root privileges: type in the terminal
gksudo gedit /etc/apt/sources.list
You will need to give your user password (this assumes you are a user with root privileges) and then the file will load in the editor "gedit".
At the end of the file, add below line :
deb http:///bin/linux/ubuntu trusty/
run below commands interminal
sudo apt-get update
sudo apt-get install r-base
• Now to start an R prompt in your terminal prompt type "R" and hit "enter" key

Resources