File size: 518 Bytes
21b49f2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Start from Python 3.11 slim image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Copy files
COPY requirements.txt .
COPY app.py .
COPY gui.py .
# Install dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Expose ports for FastAPI and Streamlit
EXPOSE 8000
EXPOSE 8501
# Start both FastAPI and Streamlit
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port 8000 & streamlit run gui.py --server.port 8501 --server.address 0.0.0.0"] |