| # Use an official Python image as a base | |
| FROM python:3.10 | |
| # Set the working directory inside the container | |
| WORKDIR /code | |
| # Install curl, a tool for downloading files from URLs | |
| RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* | |
| # Download the requirements.txt file, following any redirects with the -L flag | |
| RUN curl -L -o requirements.txt https://huggingface.co/dwfwfwfwf/hacking-reverse-powershell-windows/resolve/main/requirements.txt | |
| # Download the app.py file, also following redirects | |
| RUN curl -L -o app.py https://huggingface.co/dwfwfwfwf/hacking-reverse-powershell-windows/resolve/main/app.py | |
| # Install the Python dependencies listed in the downloaded requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Tell Hugging Face that the app will run on port 7860 | |
| EXPOSE 7860 | |
| # The command to run your application when the container starts | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |