LLM_TRIAL / Dockerfile
vishnu714's picture
Update Dockerfile
2a5a45a verified
raw
history blame contribute delete
680 Bytes
FROM python:3.9-slim
WORKDIR /app
COPY . /app
RUN apt-get update && apt-get install -y \
build-essential \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 8501
RUN wget https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q5_K_M.gguf
# Install FastAPI dependencies
RUN pip install uvicorn
# Expose FastAPI port
EXPOSE 8000
# Create a script to run both Streamlit and FastAPI
RUN echo '#!/bin/bash\n\
uvicorn app:app --host 0.0.0.0 --port 8000 &\n\
streamlit run app.py --server.port=8501 --server.address=0.0.0.0\n\
' > /app/start.sh && chmod +x /app/start.sh
CMD ["/app/start.sh"]