Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| # ์์ ๋๋ ํ ๋ฆฌ | |
| WORKDIR /app | |
| # ํ์ ํจํค์ง ์ค์น | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| software-properties-common \ | |
| git \ | |
| libgl1-mesa-glx \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Hugging Face ์บ์ ๋๋ ํ ๋ฆฌ | |
| RUN mkdir -p /app/hf_cache && chmod -R 777 /app/hf_cache | |
| ENV TRANSFORMERS_CACHE=/app/hf_cache | |
| ENV HF_HOME=/app/hf_cache | |
| # ์์กด์ฑ ์ค์น | |
| COPY requirements.txt ./ | |
| COPY src/ ./src/ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # ํฌํธ/ํฌ์ค์ฒดํฌ | |
| EXPOSE 8501 | |
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1 | |
| # ์คํ | |
| ENTRYPOINT ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"] | |