# docker/base.Dockerfile FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-devel ENV CUDA_HOME=/usr/local/cuda # 1) 필수 OS 패키지 + CA RUN apt-get update && \ apt-get install -y --no-install-recommends \ ca-certificates curl gnupg git && \ update-ca-certificates # 2) Python 패키지 # docker/base.Dockerfile – Python 패키지 설치 단계 # 1) Python 패키지 설치 RUN pip install --no-cache-dir --upgrade \ --trusted-host pypi.org --trusted-host files.pythonhosted.org \ tokenizers==0.21.2 \ faiss-cpu==1.8.0 \ sentence-transformers \ transformers==4.55.0 \ accelerate bitsandbytes==0.43.2 \ safetensors==0.4.3 \ FlagEmbedding \ # flash-attn==2.4.2 \ fastapi uvicorn # 2) torch 에 uint64 심볼 임시 추가 (safetensors import 전에 실행) RUN python - <<'PY' import torch, types, sys if not hasattr(torch, "uint64"): torch.uint64 = torch.int64 print("✔ torch.uint64 patched:", hasattr(torch, "uint64")) PY