Spaces:
Sleeping
Sleeping
| # λ‘컬 κ°λ°μ© Lily LLM API Server Dockerfile | |
| FROM python:3.11-slim | |
| # λ‘컬 νκ²½ λ³μ μ€μ | |
| ENV IS_LOCAL=true | |
| ENV ENVIRONMENT=local | |
| ENV DOCKER_ENV=local | |
| ENV PYTHONPATH=/app | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV TOKENIZERS_PARALLELISM=false | |
| # μμ λλ ν 리 μ€μ | |
| WORKDIR /app | |
| # μμ€ν μμ‘΄μ± μ€μΉ | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| git \ | |
| wget \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| libfontconfig1 \ | |
| libxrender1 \ | |
| libgl1-mesa-glx \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Python μμ‘΄μ± μ€μΉ | |
| COPY requirements_full.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade pip | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # NLTK λ°μ΄ν° λ€μ΄λ‘λ | |
| RUN python -c "import nltk; nltk.download('punkt'); nltk.download('punkt_tab'); nltk.download('averaged_perceptron_tagger'); nltk.download('maxent_ne_chunker'); nltk.download('words'); nltk.download('stopwords')" | |
| # νμν λλ ν 리 μμ± | |
| RUN mkdir -p /app/data /app/logs /app/models /app/uploads /app/vector_stores /app/temp | |
| # μ ν리μΌμ΄μ μ½λ λ³΅μ¬ | |
| COPY . . | |
| # κΆν μ€μ | |
| RUN chmod +x /app/*.py | |
| # ν¬νΈ λ ΈμΆ (λ‘컬 κ°λ°μ©) | |
| EXPOSE 8001 | |
| # ν¬μ€μ²΄ν¬ | |
| HEALTHCHECK --interval=30s --timeout=30s --start-period=60s --retries=3 \ | |
| CMD curl -f http://localhost:8001/health || exit 1 | |
| # λ‘컬 κ°λ°μ© μ± μμμ | |
| CMD ["python", "app_local.py"] |