Spaces:
Runtime error
Runtime error
# Install system dependencies | |
RUN apt-get update && apt-get install -y curl git python3 python3-pip && \ | |
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ | |
apt-get install -y git-lfs | |
# Create the code directory and ensure it's owned by the non-root user | |
RUN mkdir -p /code && chown user:user /code | |
# Switch to non-root user | |
RUN useradd -m -u 1000 user | |
USER user | |
ENV HOME=/home/user \ | |
PATH=/home/user/.local/bin:$PATH \ | |
MPLCONFIGDIR=$HOME/.config/matplotlib \ | |
TRANSFORMERS_CACHE=$HOME/.cache/huggingface/hub | |
WORKDIR /code | |
# Clone the repository using git clone and set up Git LFS | |
RUN git lfs install && \ | |
git clone https://huggingface.co/AskUI/pta-text-0.1 ./model | |
# Copy the rest of your application files | |
COPY --chown=user . . | |
CMD ["python3", "app.py"] | |