evanskim113 commited on
Commit
9ff2f47
·
verified ·
1 Parent(s): 8cbe22a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -5
Dockerfile CHANGED
@@ -1,21 +1,31 @@
 
 
 
 
1
  FROM python:3.12.6-slim
2
 
3
- WORKDIR /app/src
 
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
8
  git \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- COPY requirements.txt ../requirements.txt
12
- COPY . .
 
13
 
 
14
  RUN pip install --upgrade pip wheel setuptools && \
15
- pip install -r ../requirements.txt
16
 
 
17
  EXPOSE 8501
18
-
19
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
20
 
 
 
21
  ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ # ====================================================
2
+ # ✅ Hugging Face Spaces용 Streamlit + CatBoost App
3
+ # ====================================================
4
+
5
  FROM python:3.12.6-slim
6
 
7
+ # 1️⃣ 작업 경로 설정
8
+ WORKDIR /app
9
 
10
+ # 2️⃣ 필수 유틸 설치
11
  RUN apt-get update && apt-get install -y \
12
  build-essential \
13
  curl \
14
  git \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # 3️⃣ 코드 복사
18
+ COPY requirements.txt /app/requirements.txt
19
+ COPY src /app/src
20
 
21
+ # 4️⃣ pip 업그레이드 및 라이브러리 설치
22
  RUN pip install --upgrade pip wheel setuptools && \
23
+ pip install -r /app/requirements.txt
24
 
25
+ # 5️⃣ 포트 & 헬스체크
26
  EXPOSE 8501
 
27
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
28
 
29
+ # 6️⃣ 실행 (경로 명시)
30
+ WORKDIR /app/src
31
  ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]