Spaces:
Runtime error
Runtime error
Download Dockerfile from ToddLLM/ChatWithYourPDF: direct link, hf CLI and curl.
- Browser
- Download file 807 Bytes
-
https://huggingface.co/spaces/ToddLLM/ChatWithYourPDF/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ToddLLM/ChatWithYourPDF/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ToddLLM/ChatWithYourPDF/resolve/main/Dockerfile
807 Bytes
| FROM python:3.9 | |
| # Create a user with UID 1000 and create the necessary directories with appropriate permissions | |
| RUN useradd -m -u 1000 user && \ | |
| mkdir /home/user/app && \ | |
| chown user:user /home/user/app -R && \ | |
| chmod 755 /home/user/app -R | |
| # Switch to the new user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Set the working directory (this will automatically switch to this directory) | |
| WORKDIR $HOME/app | |
| # Install dependencies | |
| # Note: Copying requirements.txt separately allows Docker to cache the installed packages unless requirements.txt changes | |
| COPY --chown=user:user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of your application's code | |
| COPY --chown=user:user . . | |
| CMD ["chainlit", "run", "app.py", "--port", "7860"] | |