parkkyujin commited on
Commit
0d2d163
ยท
verified ยท
1 Parent(s): 9847980

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -4
Dockerfile CHANGED
@@ -1,5 +1,4 @@
1
  FROM python:3.9-slim
2
-
3
  WORKDIR /app
4
 
5
  RUN apt-get update && apt-get install -y \
@@ -15,11 +14,16 @@ COPY requirements.txt ./
15
  # 2. requirements.txt์— ๋ช…์‹œ๋œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค ๋จผ์ € ์„ค์น˜
16
  RUN pip3 install --no-cache-dir -r requirements.txt
17
 
18
- # 3. ๋ชจ๋“  ๋‹ค๋ฅธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์„ค์น˜๋œ ํ›„, ์ตœ์ข…์ ์œผ๋กœ NumPy๋ฅผ ์„ค์น˜ํ•˜์—ฌ ๋ฎ์–ด์“ฐ๊ธฐ
19
- RUN pip3 install --no-cache-dir numpy==1.24.3
20
 
21
  # 4. NumPy ์„ค์น˜ ๋ฐ ํ•ต์‹ฌ ๋ชจ๋“ˆ ์ž„ํฌํŠธ ํ™•์ธ
22
- RUN python -c "import numpy; print(f'NumPy version after final install: {numpy.__version__}'); import numpy.core._multiarray_umath; print('Successfully imported numpy.core._multiarray_umath')"
 
 
 
 
 
23
 
24
  # ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฐ ๋ฐ์ดํ„ฐ ํŒŒ์ผ ๋ณต์‚ฌ
25
  COPY streamlit_app.py ./
@@ -27,5 +31,7 @@ COPY ๊ด‘๊ณ ์นดํ”ผ๋ฐ์ดํ„ฐ_๋ธŒ๋žœ๋“œ์ถ”์ถœ์™„๋ฃŒ.xlsx ./
27
  COPY copy_embeddings.pkl ./
28
 
29
  EXPOSE 8501
 
30
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
 
31
  ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
  FROM python:3.9-slim
 
2
  WORKDIR /app
3
 
4
  RUN apt-get update && apt-get install -y \
 
14
  # 2. requirements.txt์— ๋ช…์‹œ๋œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค ๋จผ์ € ์„ค์น˜
15
  RUN pip3 install --no-cache-dir -r requirements.txt
16
 
17
+ # 3. NumPy 2.0+ ์„ค์น˜ (์ž„๋ฒ ๋”ฉ ํŒŒ์ผ๊ณผ ํ˜ธํ™˜๋˜๋„๋ก)
18
+ RUN pip3 install --no-cache-dir "numpy>=2.0.0"
19
 
20
  # 4. NumPy ์„ค์น˜ ๋ฐ ํ•ต์‹ฌ ๋ชจ๋“ˆ ์ž„ํฌํŠธ ํ™•์ธ
21
+ RUN python -c "import numpy; print(f'NumPy version after final install: {numpy.__version__}'); \
22
+ try: \
23
+ import numpy._core; print('Successfully imported numpy._core'); \
24
+ except ImportError: \
25
+ import numpy.core; print('Using numpy.core fallback'); \
26
+ print('NumPy installation verified')"
27
 
28
  # ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฐ ๋ฐ์ดํ„ฐ ํŒŒ์ผ ๋ณต์‚ฌ
29
  COPY streamlit_app.py ./
 
31
  COPY copy_embeddings.pkl ./
32
 
33
  EXPOSE 8501
34
+
35
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
36
+
37
  ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]