Spaces:
Runtime error
Runtime error
Download Dockerfile from Forrest99/codebertBase: direct link, hf CLI and curl.
- Browser
- Download file 479 Bytes
-
https://huggingface.co/spaces/Forrest99/codebertBase/resolve/f1f2ca121ade9b3b3a753a34c2fa582506284ebf/Dockerfile
- Command line
-
hf download hf://spaces/Forrest99/codebertBase@f1f2ca121ade9b3b3a753a34c2fa582506284ebf/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Forrest99/codebertBase/resolve/f1f2ca121ade9b3b3a753a34c2fa582506284ebf/Dockerfile
479 Bytes
| FROM python:3.9-slim | |
| # 修复权限问题(关键步骤) | |
| RUN mkdir -p /app/.cache/huggingface && \ | |
| chmod 777 -R /app | |
| # 安装系统依赖 | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends gcc python3-dev && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # 安装Python依赖 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 复制代码 | |
| COPY app.py . | |
| # 启动命令 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |