Spaces:
Runtime error
Runtime error
Download Dockerfile from Forrest99/codebertBase: direct link, hf CLI and curl.
- Browser
- Download file 573 Bytes
-
https://huggingface.co/spaces/Forrest99/codebertBase/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Forrest99/codebertBase/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Forrest99/codebertBase/resolve/main/Dockerfile
573 Bytes
| FROM python:3.9-slim | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 修复缓存目录权限 | |
| RUN mkdir -p /app/.cache/huggingface && \ | |
| chmod -R 777 /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 --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # 复制代码(保留文件权限) | |
| COPY --chmod=644 app.py . | |
| # 启动命令 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |