|
|
|
|
|
|
|
|
|
|
|
FROM python:3.12
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
build-essential \
|
|
|
curl \
|
|
|
software-properties-common \
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
RUN mkdir -p data db && chmod 777 data db
|
|
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
EXPOSE 7860
|
|
|
|
|
|
|
|
|
RUN echo '
|
|
|
uvicorn main:app --host 0.0.0.0 --port 8000 &\n\
|
|
|
streamlit run streamlit_app.py --server.port 7860 --server.address 0.0.0.0 --server.enableCORS false\n\
|
|
|
' > /app/run.sh
|
|
|
|
|
|
RUN chmod +x /app/run.sh
|
|
|
|
|
|
|
|
|
CMD ["/app/run.sh"] |