| # Use a lightweight Python image | |
| FROM python:3.10-slim | |
| # Install Git and build tools | |
| RUN apt-get update && apt-get install -y git && apt-get clean | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy app files to container | |
| COPY . . | |
| # Install pip packages (except TSNet) | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Install TSNet from GitHub after git is ready | |
| RUN pip install git+https://github.com/BidyutSarkar/TSNet.git | |
| # Set environment variable to disable Streamlit telemetry | |
| ENV STREAMLIT_TELEMETRY=0 | |
| # Run the Streamlit app | |
| CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.enableCORS=false"] | |