Spaces:
Runtime error
Runtime error
Download Dockerfile from gthai/gthTranslate: direct link, hf CLI and curl.
- Browser
- Download file 509 Bytes
-
https://huggingface.co/spaces/gthai/gthTranslate/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/gthai/gthTranslate/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/gthai/gthTranslate/resolve/main/Dockerfile
509 Bytes
| FROM python:3.9-slim | |
| # Install Tesseract and Git | |
| RUN apt-get update && apt-get install -y \ | |
| tesseract-ocr \ | |
| libtesseract-dev \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create a non-root user | |
| RUN useradd -m appuser | |
| WORKDIR /app | |
| COPY . /app | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Change ownership of the /app directory to appuser | |
| RUN chown -R appuser:appuser /app | |
| # Switch to the non-root user | |
| USER appuser | |
| EXPOSE 7861 | |
| CMD ["python", "main.py"] |