Skip to content

Instantly share code, notes, and snippets.

@vukhanhtruong
vukhanhtruong / jetson_setup.md
Created November 1, 2025 09:51 — forked from hoangnt2601/jetson_setup.md
Cài đặt môi trường và thư viện triển khai AI trên Jetson nano

Nvidia Drivers, Cuda, Cudnn, Tensorrt

Nvidia Drivers

Gỡ bỏ Cuda, Drivers cũ trên máy

sudo /usr/local/cuda-X.Y/bin/uninstall_cuda_X.Y.pl
sudo /usr/bin/nvidia-uninstall
sudo reboot
# Requirements:
# OS: Ubuntu18.04 LTS
# Python >= 3.8
# Cuda: 10.2,
# CudaNN 8.1.1
# Download TensorRT 7.2.3 for Linux and CUDA 10.2 from https://developer.nvidia.com/nvidia-tensorrt-7x-download for ubuntu 18.04
# or from this link https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/7.2.3/local_repos/nv-tensorrt-repo-ubuntu1804-cuda10.2-trt7.2.3.4-ga-20210226_1-1_amd64.deb
# OPEN terminal

FWIW: I (@Rondy) am not the author of the content presented here, which is an outline from Edmond Lau's book. I've just copy-pasted it from somewhere and saved as a personal gist, before it got popular on newsnews.ycombinator.com. I don't remember where exactly the original source is from and neither could find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

@vukhanhtruong
vukhanhtruong / openai-gpt-3.5-turbo.js
Last active March 13, 2023 11:09
Fetch OpenAI API code snippet in JS
try {
const GPT_KEY = process.env.CHATGPT_API_KEY;
const headers = {
'Content-Type': 'application/json',
Authorization: `Bearer ${GPT_KEY}`,
};
const prompt = req.query.text;
@vukhanhtruong
vukhanhtruong / semantic-commit-message-checker.yaml
Last active December 1, 2021 02:56
Github Actions for checking semantic commit message & task-id included
name: 'Semantic Commit Message Checker'
on:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
check-commit-message:
@vukhanhtruong
vukhanhtruong / how-to-connect-from-docker-container-to-host.md
Last active September 9, 2021 09:13
How to connect from docker container to host

Two ways to reach host

  1. Use --network="host" in your docker run command, then 127.0.0.1 in your docker container will point to your docker host.

  2. Get host IP by running following command. Then you should reach the host from container.

ip addr show docker0 | grep -Po 'inet \K[\d.]+'

# 172.17.0.1
@vukhanhtruong
vukhanhtruong / configmap.yaml
Last active May 4, 2021 09:33
[Kubernetes] Nginx as a sidecar container sample.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf-configmap
labels:
app: your-app
data:
nginx.conf: |-
error_log /dev/stdout info;
events {
@vukhanhtruong
vukhanhtruong / README.md
Last active February 19, 2021 07:08
Terraform, Helm, Nginx Ingress and Hello-world app

Usage

Start minikube

minikube start --driver=kvm2

Terraform apply

@vukhanhtruong
vukhanhtruong / README-Fancy.md
Created October 21, 2020 04:30 — forked from ramantehlan/README-Fancy.md
README template I use for most of my projects.

Introduction

  • Add your project logo.
  • Write a short introduction to the project.
  • If you are using badges, add them here.

📒 Index

@vukhanhtruong
vukhanhtruong / _Mattermost with automatic renew ssl.md
Last active September 19, 2020 02:27
Mattermost using the Docker setup together with nginx-proxy, using the LetsEncrypt companion container for nginx-proxy for automatic renew ssl.

Getting Started

First, create a Docker network. This enables container DNS, which allows containers to communicate with one another by name.

docker network create mattermostnw

Customize the nginx-proxy settings

  • Read the official Mattermost docker here