| # Use Python 3.11.6 as a base image | |
| FROM python:3.11.6-slim | |
| # Set the working directory | |
| WORKDIR /app | |
| # Install git | |
| RUN apt-get update && apt-get install -y git | |
| # Expose the GitHub repository URL secret at build time and clone the repository | |
| RUN --mount=type=secret,id=GITHUB_REPO_URL,mode=0444,required=true \ | |
| git clone https://github.com/hayderab/Teaching-bot.git | |
| # Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the content of the local src directory to the working directory | |
| COPY . /app | |
| # Expose the port that your app will run on | |
| EXPOSE 8501 | |
| # Command to run the application | |
| CMD ["streamlit", "run", "lc_main.py"] | |