FROM python:3.9 # Set the working directory to /code WORKDIR /code # Copy the requirements file into the container COPY ./requirements.txt /code/requirements.txt # Install the dependencies RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # Copy the rest of the application code COPY . . # Create a writable directory for the database (HF Spaces requirement) RUN chmod 777 /code # Command to run the application CMD ["python", "app.py"]