# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker FROM python:3.9 # Install system dependencies first RUN apt-get update && apt-get install -y \ fcrackzip \ john \ john-data \ unzip \ && rm -rf /var/lib/apt/lists/* # Create user AFTER installing system packages RUN useradd -m -u 1000 user USER user ENV PATH="/home/user/.local/bin:$PATH" WORKDIR /app # Copy and install Python requirements COPY --chown=user ./requirements.txt requirements.txt RUN pip install --no-cache-dir --upgrade -r requirements.txt # Copy app files COPY --chown=user . /app # Set environment variables for matplotlib ENV MPLCONFIGDIR=/tmp/matplotlib ENV HOME=/home/user # Run Gradio app CMD ["python", "app.py"]