-
Notifications
You must be signed in to change notification settings - Fork 5
/
level_2_dkt.sh
58 lines (44 loc) · 1.69 KB
/
level_2_dkt.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Written by [email protected] for ai_tech_6_level_2_DKT competiton
# Data Download
wget https://aistages-api-public-prod.s3.amazonaws.com/app/Competitions/000268/data/data.tar.gz ~ /data.tar.gz
# Baseline Download
# wget https://aistages-api-public-prod.s3.amazonaws.com/app/Competitions/000268/data/code.tar.gz ~ /code.tar.gz
# 압축 파일 해제 및 삭제
tar -zxvf code.tar.gz
# tar -zxvf data.tar.gz
rm -r *.gz
sleep 3
echo "Data 및 Baseline Code 세팅 완료"
# miniconda 설치
MINICONDA_INSTALLER_SCRIPT="Miniconda3-latest-Linux-x86_64.sh"
MINICONDA_PREFIX="${HOME}/miniconda3"
# Miniconda 다운로드
wget https://repo.anaconda.com/miniconda/${MINICONDA_INSTALLER_SCRIPT} -O /tmp/${MINICONDA_INSTALLER_SCRIPT}
# Miniconda 설치
bash /tmp/${MINICONDA_INSTALLER_SCRIPT} -b -p ${MINICONDA_PREFIX}
# Miniconda 초기화 및 PATH 설정
eval "$(${MINICONDA_PREFIX}/bin/conda shell.bash hook)"
conda init
conda config --set auto_activate_base false
# 임시 파일 삭제
rm /tmp/${MINICONDA_INSTALLER_SCRIPT}
echo "Miniconda 설치가 완료"
CONDA_BASE=$(conda info --base)
. $CONDA_BASE/etc/profile.d/conda.sh
# dkt 가상환경 설정
cd code/dkt
conda create --name dkt python=3.8 -y
conda activate dkt
pip install -r requirements.txt
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch -y
echo "DKT 가상환경 설정 완료"
conda deactivate
# lightgcn 가상환경 설정
cd ..
cd lightgcn
conda create --name lightgcn python=3.8 -y
conda activate lightgcn
pip install -r requirements.txt
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch -y
echo "LightGCN 가상환경 설정 완료"