Download Dockerfile from tejani/NewApp: direct link, hf CLI and curl.
- Browser
- Download file 630 Bytes
-
https://huggingface.co/spaces/tejani/NewApp/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/tejani/NewApp/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/tejani/NewApp/resolve/main/Dockerfile
630 Bytes
| FROM python:3.10 | |
| WORKDIR /code | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Install libGL and other dependencies for OpenCV | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1-mesa-glx \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxrender1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Pre-migrate Transformers cache | |
| RUN python -c "from transformers.utils import move_cache; move_cache()" | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| COPY --chown=user . $HOME/app | |
| CMD ["python", "app.py"] |