docker build -t kimhan .
สร้าง container ชื่อ kimhan_container จาก image ชื่อ kimhan ชื่อ host ชื่อ kimhan และเข้าไปใน terminal ของตัวเครื่อง
docker run -h kimhan --name kimhan_container -it kimhan bash
1.5 คอมไพล์ csine.c ข้างต้น ให้ได้โปรแกรมชื่อ hello แล้วสั่งให้ทํางานเพื่อทดสอบ โดยการเรียก csine โดยตรง
gcc csine.c -o hello -lm
alias csine='/root/hello'
csine
#compile csine to hello.out. which include library math
python3 np2pd.py
1.7 download file from https://files.grouplens.org/datasets/movielens/ml-latest-small.zip
wget https://files.grouplens.org/datasets/movielens/ml-latest-small.zip
unzip ml-latest-small.zip
cd ml-latest-small
cat ratings.csv | cut -d ',' -f3 | grep -c '5.0'
cat ratings.csv | cut -d ',' -f3 | grep -c '4.0'
cat ratings.csv | cut -d ',' -f3 | grep -c '1.0'
cat ratings.csv | cut -d ',' -f3 | grep -c '0.5'
1.10 คัดกรอง rating 0.5 และเรียงตาม movieID แล้วบันทึกลงไฟล์ชื่อ query.txt พร้อม โชว์ไฟล์ส่วนต้น และ ส่วนท้าย มา 15 บรรทัด
cat ratings.csv | awk -F ',' '$3 == "0.5"' | sort -t ',' -k 2n > query.txt
head query.txt -n 15
tail query.txt -n 15
cd ..
gcc afork.c && ./a.out && rm a.out
gcc bfork.c && ./a.out && rm a.out