File size: 729 Bytes
4c56981
 
f797daa
4c56981
f797daa
 
 
 
 
 
 
4c56981
f797daa
4c56981
 
f797daa
 
 
4c56981
 
 
f797daa
4c56981
 
f797daa
4c56981
 
 
f797daa
4c56981
f797daa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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"]