Download Dockerfile from muryshev/cb-api: direct link, hf CLI and curl.
- Browser
- Download file 760 Bytes
-
https://huggingface.co/spaces/muryshev/cb-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/muryshev/cb-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/muryshev/cb-api/resolve/main/Dockerfile
760 Bytes
| # Use a base image that supports Python and includes Tesseract | |
| FROM python:3.9-slim | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED 1 | |
| ENV FLASK_APP app.py | |
| ENV APP_HOME /app | |
| # Install Tesseract and its dependencies | |
| RUN apt-get update && apt-get install --no-install-recommends -y \ | |
| tesseract-ocr tesseract-ocr-rus poppler-utils python3-opencv && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Create and set the working directory | |
| RUN mkdir /var/www | |
| RUN mkdir /var/www/tmp | |
| RUN chmod a+w /var/www/tmp | |
| RUN groupadd -r flaskuser && useradd -r -g flaskuser flaskuser | |
| ENV HOME /var/www | |
| WORKDIR /var/www | |
| COPY . /var/www | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| USER flaskuser | |
| EXPOSE 7860 | |
| # Run the Flask application | |
| CMD flask run --host=0.0.0.0 --port=7860 |