Download the latest Nvidia driver on http://www.nvidia.com/drivers
Update the kernel to the latest version
$ yum update
Change to runlevel 3 - multi user mode for the next reboot
#!/bin/bash | |
# | |
# script to extract ImageNet dataset | |
# ILSVRC2012_img_train.tar (about 138 GB) | |
# ILSVRC2012_img_val.tar (about 6.3 GB) | |
# make sure ILSVRC2012_img_train.tar & ILSVRC2012_img_val.tar in your current directory | |
# | |
# https://github.com/facebook/fb.resnet.torch/blob/master/INSTALL.md | |
# | |
# train/ |
#!/usr/bin/env bash | |
# | |
# img2vid | |
# ======= | |
# | |
# Convert an image into three second video | |
# | |
# Usage: ./img2vid photo.jpg video.mp4 | |
# |
# WARNING: These steps seem to not work anymore! | |
#!/bin/bash | |
# Purge existign CUDA first | |
sudo apt --purge remove "cublas*" "cuda*" | |
sudo apt --purge remove "nvidia*" | |
# Install CUDA Toolkit 10 | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb |
Download the latest Nvidia driver on http://www.nvidia.com/drivers
Update the kernel to the latest version
$ yum update
Change to runlevel 3 - multi user mode for the next reboot
# Steps to build and install tmux from source. | |
# Takes < 25 seconds on EC2 env [even on a low-end config instance]. | |
VERSION=2.7 | |
sudo yum -y remove tmux | |
sudo yum -y install wget tar libevent-devel ncurses-devel | |
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz | |
tar xzf tmux-${VERSION}.tar.gz | |
rm -f tmux-${VERSION}.tar.gz | |
cd tmux-${VERSION} |
1. Container can't connect to internet.
Reason: DNS is not configured.
Sol Reference:
nm-tool # (will give you the dns IP)
vim /etc/default/docker # (uncomment the DOCKER_OPTS and add DNS IP)
DOCKER_OPTS="--dns your.dns.ip --dns 8.8.8.8 --dns 8.8.4.4"
rm `docker ps --no-trunc -aq` # (remove all the containers to avoid DNS cache)
import numpy as np | |
#数组形式:[[]] | |
[[1, 2, 3, 4], [1, 2, 3, 4]] | |
#创建数组 | |
a = np.array([1, 2, 3, 4]) #创建一维数组方法一 | |
b = np.array((5, 6, 7, 8)) #创建一维数组方法二 | |
c = np.array([[1, 2, 3, 4], [4, 5, 6, 7], [7, 8, 9, 10]]) #创建二维数组 | |
a.shape #数组A的形状;返回一个元组 |