| |
| FROM python:3.11-slim |
|
|
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| build-essential \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN pip install pysqlite3-binary |
|
|
| |
| COPY pyproject.toml uv.lock* ./ |
|
|
| |
| RUN pip install uv |
|
|
| |
| RUN uv pip install --system -r pyproject.toml || \ |
| pip install -r requirements.txt || \ |
| uv pip install --system gradio langchain langchain-community langchain-core chromadb sentence-transformers requests python-dotenv langchain-huggingface langchain-openai openai tiktoken fastapi uvicorn python-multipart pysqlite3-binary |
|
|
| |
| COPY . . |
|
|
| |
| RUN mkdir -p db multiple_docs game |
|
|
| |
| ENV PORT=7860 |
| ENV HF_TOKEN=${HF_TOKEN} |
| ENV HF_MODEL_NAME=${HF_MODEL_NAME:-meta-llama/Llama-3.1-8B-Instruct:novita} |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD python -c "import sys, os; sys.path.insert(0, '.'); from game_api import app; import uvicorn; port = int(os.getenv('PORT', 7860)); uvicorn.run(app, host='0.0.0.0', port=port)" |
|
|