# Use the official Python 3.10.9 image FROM python:3.11.5 # Copy the current directory contents into the container at . COPY . . # Set the working directory to / WORKDIR / # Install requirements.txt RUN pip install --no-cache-dir -r /requirements.txt # Install GPG RUN apt-get update && apt-get install -y gnupg # Decrypt the sensitive file RUN --mount=type=secret,id=DECRYPT_KEY,mode=0444,required=true \ gpg --batch --yes --passphrase $(cat /run/secrets/DECRYPT_KEY) --decrypt searcher.py.gpg > searcher.py # Start the FastAPI app on port 7860, the default port expected by Spaces CMD ["uvicorn", "router:app", "--host", "0.0.0.0", "--port", "7860"]