Spaces:
Sleeping
Sleeping
| # Use an official Python runtime as a parent image | |
| FROM python:3.9-slim | |
| # Set the working directory in the container to /app | |
| WORKDIR /app | |
| # Install git and other dependencies | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| # Clone the repository | |
| RUN git clone https://github.com/KenKout/CO3001.git /app | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| RUN chmod 777 /app | |
| COPY studyspace.db . | |
| RUN chmod 777 studyspace.db | |
| # Expose the port that Uvicorn will run on | |
| EXPOSE 8000 | |
| # Run Uvicorn when the container launches | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] | |