File size: 609 Bytes
1d37dfb
56bf5b7
 
1d37dfb
 
56bf5b7
 
 
e65d77f
 
56bf5b7
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
# Use Python 3.10 slim base image
FROM python:3.10-slim
WORKDIR /app
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
ENV HF_HOME=/app/.cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir gunicorn
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')" \
    && chmod -R 777 /app/.cache
COPY GeminiAgent.py main.py routes.py serialization.py tool.py .
EXPOSE 7860
CMD ["gunicorn", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "main:app", "--bind", "0.0.0.0:7860"]