Skip to content

Instantly share code, notes, and snippets.

View spdin's full-sized avatar
🏠
Working from home

Saripudin spdin

🏠
Working from home
View GitHub Profile
ctrl+alt+f1
cd "/Downloads/cuda utils/"
pilih No jika ada yg nanya2 install
sudo service lightdm stop
sudo ./NVIDIA-Linux-x86_64-430.50.run
sudo service lightdm start
@spdin
spdin / command
Last active July 8, 2021 08:22
Download Google Drive Files using wget
#https://medium.com/@acpanjan/download-google-drive-files-using-wget-3c2c025a8b99
# change FILEID
# https://drive.google.com/file/d/1UibyVC_C2hoT_XEw15gPEwPW4yFyJFeOEA
# FILEID = 1UibyVC_C2hoT_XEw15gPEwPW4yFyJFeOEA
# tools
https://gdrive-wget.glitch.me/
# small file
@spdin
spdin / docker command collection
Last active March 16, 2020 10:33
docker command collection
# split file
split -b 500M <<NAMA FILE>> x
# join file
cat x* > <<NAMA FILE>>
# https://rtyley.github.io/bfg-repo-cleaner/
# check pack size
git count-objects -v -H
# download bfg and move to directory, rename to bfg
wget https://repo1.maven.org/maven2/com/madgag/bfg/1.13.0/bfg-1.13.0.jar
# clone mirror
git clone --mirror git://example.com/some-big-repo.git
@spdin
spdin / install_samba.sh
Created January 30, 2020 09:59
Install Samba on Ubuntu
#install samba
sudo apt install samba
#check installation
whereis samba
# output :
# samba: /usr/sbin/samba /usr/lib/samba /etc/samba /usr/share/samba /usr/share/man/man7/samba.7.gz /usr/share/man/man8/samba.8.gz
# edit file
sudo nano /etc/samba/smb.conf
@spdin
spdin / docker_horovod_collection.sh
Last active March 3, 2020 11:09
Docker and horovod command collection
# build images from Dockerfile
docker build -t horovod:latest horovod-docker-gpu
# get list images
docker images
# get list container
docker ps
# remove container
@spdin
spdin / Dockerfile
Created January 29, 2020 06:36
Dockerfile for horovod with PyTorch 1.3.0
# This Dockerfile specifically for using PyTorch 1.3.0
FROM nvidia/cuda:10.0-devel-ubuntu18.04
# TensorFlow version is tightly coupled to CUDA and cuDNN so it should be selected carefully
# ENV TENSORFLOW_VERSION=2.0.0
ENV PYTORCH_VERSION=1.3.0
ENV TORCHVISION_VERSION=0.4.1
ENV CUDNN_VERSION=7.6.0.64-1+cuda10.0
ENV NCCL_VERSION=2.4.7-1+cuda10.0
# ENV MXNET_VERSION=1.5.0
@spdin
spdin / install_nvidia_docker_ubuntu_16.04.sh
Created January 29, 2020 06:34
Install nvidia-docker on Ubuntu-16.04
# Install nvidia-container-toolkit
# source : https://github.com/NVIDIA/nvidia-docker#ubuntu-16041804-debian-jessiestretchbuster
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
$ curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
$ curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
# Install nvidia-runtime
# Download nvidia-runtime packages
@spdin
spdin / install_docker_ubuntu_16.04.sh
Last active January 29, 2020 06:30
Install Docker on Ubuntu-16.04
# add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# add the Docker repository to APT sources
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# update the package database with the Docker packages from the newly added repo
sudo apt-get update
# install from the Docker repo instead of the default Ubuntu 16.04 repo
@spdin
spdin / ieee754_converter.py
Last active October 31, 2019 10:53
IEEE 754 Converter
# https://stackoverflow.com/questions/8751653/how-to-convert-a-binary-string-into-a-float-value
# http://weitz.de/ieee/
from codecs import decode
import struct
def bin_to_float(b):
""" Convert binary string to a float. """
bf = int_to_bytes(int(b, 2), 8) # 8 bytes needed for IEEE 754 binary64.