|
# 1. Python 3.9 ๊ธฐ๋ฐ ์ด๋ฏธ์ง ์ฌ์ฉ |
|
FROM python:3.9 |
|
|
|
# 2. ์์
๋๋ ํ ๋ฆฌ ์ค์ |
|
WORKDIR /app |
|
|
|
# 3. ํ์ ํจํค์ง ์ค์น (libaio1์ Oracle Instant Client์ ํ์) |
|
RUN apt-get update && apt-get install -y libaio1 unzip |
|
|
|
# 3-2. Hugging Face ์บ์ ๋๋ ํ ๋ฆฌ ๋ณ๊ฒฝ (๊ถํ ๋ฌธ์ ๋ฐฉ์ง) |
|
ENV HF_HOME="/app/.cache/huggingface" |
|
RUN mkdir -p $HF_HOME && chmod -R 777 $HF_HOME |
|
|
|
# 4. Oracle Instant Client ์ ์ฅ ๊ฒฝ๋ก ์ค์ (์๊ตฌ ์ ์ฅ ๊ฐ๋ฅํ๊ฒ) |
|
ENV ORACLE_CLIENT_PATH="/opt/oracle" |
|
RUN mkdir -p $ORACLE_CLIENT_PATH |
|
|
|
# 5. Oracle Instant Client ์์ถํ์ผ ๋ณต์ฌ |
|
COPY instantclient-basic-linux.x64-19.26.0.0.0dbru.zip $ORACLE_CLIENT_PATH/ |
|
|
|
# 6. Oracle Instant Client ์ค์น (์ด๋ฏธ ์์ผ๋ฉด ๋ค์ ์ค์นํ์ง ์์) |
|
RUN test -d "$ORACLE_CLIENT_PATH/instantclient_19_26" || ( \ |
|
unzip $ORACLE_CLIENT_PATH/instantclient-basic-linux.x64-19.26.0.0.0dbru.zip -d $ORACLE_CLIENT_PATH && \ |
|
rm $ORACLE_CLIENT_PATH/instantclient-basic-linux.x64-19.26.0.0.0dbru.zip \ |
|
) |
|
|
|
# 7. Instant Client ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์ |
|
ENV LD_LIBRARY_PATH="$ORACLE_CLIENT_PATH/instantclient_19_26:$LD_LIBRARY_PATH" |
|
ENV ORACLE_HOME="$ORACLE_CLIENT_PATH/instantclient_19_26" |
|
|
|
# 8. Python ํจํค์ง ์ค์น (์ด ๋จ๊ณ๊น์ง ์บ์ฑ ์ ์ง) |
|
COPY requirements.txt . |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
# 9. โ
Checkpoint ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ ๋ณผ๋ฅจ ์ค์ & ๊ถํ ๋ถ์ฌ |
|
#VOLUME ["/data"] |
|
#RUN mkdir -p /data && chmod -R 777 /data |
|
|
|
# 10. ์์ค ์ฝ๋ ๋ณต์ฌ |
|
COPY . . |
|
|
|
# 11. ์คํํ Python ์คํฌ๋ฆฝํธ ์ง์ |
|
# ๊ธฐ๋ณธ ์คํ ๋ช
๋ น ์ค์ - ์ถ๊ฐ ํ์ต ๋ชจ๋๋ก ์คํ |
|
#CMD ["python", "main.py", "--mode", "initial"] |
|
#CMD ["python", "main.py", "--mode", "incremental"] |
|
#CMD ["python", "powersearchtraning.py", "--mode", "incremental"] |
|
#CMD ["python", "fastRecommend.py", "--mode", "incremental"] |
|
#CMD ["python", "searchHybridAsync.py", "--mode", "incremental"] |
|
#CMD ["python", "searchAsyncTunning.py", "--mode", "incremental"] |
|
#CMD ["python", "searchAsyncSingle.py"] |
|
#CMD ["python", "searchAsyncSingleTuning.py"] |
|
CMD ["python", "searchWorker.py"] |