❗ How to use MINICONDA in SNU ECE server ❗

2026. 1. 17. 15:17·Others

 

MINICONDA 사용방법

 

# 1. 스크립트 폴더 상위(프로젝트 루트)나 홈으로 이동
cd ~

# 2. Miniconda Python 3.10 버전 다운로드 (Glibc 2.27 호환)
# (사용자가 언급한 버전과 유사한, 안정적인 Linux-x86_64 버전을 받습니다)
wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.3.1-0-Linux-x86_64.sh

# 3. 설치 스크립트 실행 (권한 부여 후 실행)
chmod +x Miniconda3-py310_23.3.1-0-Linux-x86_64.sh
./Miniconda3-py310_23.3.1-0-Linux-x86_64.sh -b -p $HOME/miniconda3

# 4. conda 명령어를 쉘에 등록 (초기화)
$HOME/miniconda3/bin/conda init bash

# 5. 설정 적용을 위해 쉘 재시작 (또는 source 명령어 사용)
source ~/.bashrc


# ------------------------------------------------------------


# 1. Python 3.10 가상환경 생성 (이름: superidh)
conda create -n superidh python=3.10 -y

# 2. 가상환경 활성화
conda activate superidh

# 3. Kaggle 라이브러리 설치
pip install kaggle

#----------------------------------------------------------------

# -*- coding: utf-8 -*-
import os
import zipfile
from kaggle.api.kaggle_api_extended import KaggleApi

def download_brats2021_nifti():
    # ==================================================================
    # 1. Kaggle 인증 정보 설정
    # ==================================================================
    os.environ['KAGGLE_USERNAME'] = "bajirakkalguksu"
    os.environ['KAGGLE_KEY'] = "62521c480403f92b6d30c20c558f5343"
    
    # ==================================================================
    # 2. 경로 설정
    # ==================================================================
    # 현재 스크립트 위치 (__file__) 절대 경로 확인
    current_script_path = os.path.abspath(__file__)
    script_dir = os.path.dirname(current_script_path)
    
    # scripts 폴더의 상위(../)인 datasets 폴더 지정
    dataset_dir = os.path.abspath(os.path.join(script_dir, "../datasets"))
    
    # 최종 저장될 폴더
    target_dir = os.path.join(dataset_dir, "BraTS2021")
    
    # 폴더가 없으면 생성
    if not os.path.exists(target_dir):
        os.makedirs(target_dir)
        print(f"[Info] Created directory: {target_dir}")

    print(f"[Info] Download Target Path: {target_dir}")
    print("-" * 50)

    # ==================================================================
    # 3. Kaggle API 인증 및 다운로드
    # ==================================================================
    api = KaggleApi()
    
    try:
        print("[Step 1] Authenticating with Kaggle...")
        api.authenticate()
        print(f"[Success] Authenticated as '{os.environ['KAGGLE_USERNAME']}'")
        
        dataset_slug = "dschettler8845/brats-2021-task1"
        
        print(f"[Step 2] Downloading dataset '{dataset_slug}'... (Wait a moment)")
        # unzip=True: 다운로드 후 자동 압축 해제
        api.dataset_download_files(dataset_slug, path=target_dir, unzip=True, quiet=False)
        
        print("-" * 50)
        print("[Success] Download and Extraction Completed!")
        print(f"Check your data at: {target_dir}")
        
    except Exception as e:
        print(f"\n[Error] An error occurred: {e}")

if __name__ == "__main__":
    download_brats2021_nifti()


▲  download_brats.py 파일 수정




# -------------------------------------





(1) download_brats.py 파일 수정

(2) 실행 

# 가상환경 활성화 확인 (프롬프트 앞에 (superidh)가 있어야 함)
conda activate superidh

# 스크립트 폴더로 이동
cd /home/introai16/.agileworking/users/dhseo/projects/superidhcls/scripts

# 실행
python download_brats.py

 

 

 

 

 

 

 

 

'Others' 카테고리의 다른 글

Zhejiang Provincial People’s Hospital 데이터셋(MLUA 데이터, TSD)  (0) 2026.02.18
2026년 멀티모달팀 팀소개  (0) 2026.01.27
ISBI 2026 등록비 구조 완전 정리: Full vs Student, 논문 수·발표자 기준까지 한 번에 이해하기  (0) 2026.01.15
[jslim] RSNA 이미지 Qwen3-8B, Gemma3-27B 결과 비교  (0) 2025.12.06
[yjjean] CXR 이미지 LLM 비교 결과  (0) 2025.12.05
'Others' 카테고리의 다른 글
  • Zhejiang Provincial People’s Hospital 데이터셋(MLUA 데이터, TSD)
  • 2026년 멀티모달팀 팀소개
  • ISBI 2026 등록비 구조 완전 정리: Full vs Student, 논문 수·발표자 기준까지 한 번에 이해하기
  • [jslim] RSNA 이미지 Qwen3-8B, Gemma3-27B 결과 비교
team-sudal
team-sudal
team-sudal 님의 블로그 입니다.
  • team-sudal
    SUDAL
    team-sudal
  • 전체
    오늘
    어제
    • 분류 전체보기 (127) N
      • MedicalFM (22)
        • anomaly_detection (1)
        • change_detection (1)
        • report_generation (3)
        • classification (1)
        • denoising (1)
        • generation (0)
        • reconstruction (0)
        • regression (3)
        • segmentation (0)
        • super_resolution (1)
        • MAE (7)
      • MAISI (9)
        • MAISI_Data (9)
      • Paper_Review (46) N
      • Others (18)
      • LambdaCourse (0)
        • Paper_Review (0)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    Fibre-optic transillumination
    Bite-wing radiograph
    Visual inspection
    GaN
    Diagnosis
    Occlusal caries
    0
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
team-sudal
❗ How to use MINICONDA in SNU ECE server ❗
상단으로

티스토리툴바