Spaces:
Sleeping
Sleeping
Download Dockerfile from TeddyYao/AutoNetworkingReal: direct link, hf CLI and curl.
- Browser
- Download file 624 Bytes
-
https://huggingface.co/spaces/TeddyYao/AutoNetworkingReal/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/TeddyYao/AutoNetworkingReal/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/TeddyYao/AutoNetworkingReal/resolve/main/Dockerfile
624 Bytes
| FROM python:3.10-slim | |
| # 安装 OCR 系统包 | |
| RUN apt-get update && apt-get install -y tesseract-ocr && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| # 设置上传路径的权限 | |
| ENV STREAMLIT_SERVER_HEADLESS=true | |
| ENV STREAMLIT_SERVER_ENABLECORS=false | |
| ENV STREAMLIT_SERVER_MAXUPLOADSIZE=200 | |
| ENV STREAMLIT_SERVER_PORT=7860 | |
| ENV STREAMLIT_SERVER_FILEWATCHER_TYPE=none | |
| # 重要:显式指定临时文件上传目录 | |
| ENV TMPDIR=/tmp | |
| RUN chmod -R 777 /tmp | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install -r requirements.txt | |
| COPY . . | |
| CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] | |