Spaces:
Runtime error
Runtime error
Download Dockerfile from CEOStaff/Global-MD-Tool-API: direct link, hf CLI and curl.
- Browser
- Download file 511 Bytes
-
https://huggingface.co/spaces/CEOStaff/Global-MD-Tool-API/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/CEOStaff/Global-MD-Tool-API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/CEOStaff/Global-MD-Tool-API/resolve/main/Dockerfile
511 Bytes
| # 1. 기본 Python 3.11 이미지 사용 | |
| FROM python:3.11-slim | |
| # 2. 작업 디렉토리 설정 | |
| WORKDIR /code | |
| # 3. requirements.txt 파일을 복사하고 설치 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 4. hf_api.py 파일 복사 | |
| COPY hf_api.py . | |
| # 5. FastAPI 서버가 사용할 8008번 포트 개방 | |
| EXPOSE 8008 | |
| # 6. Space가 실행될 때 이 명령어로 hf_api.py 서버를 시작 (🛑 수정됨) | |
| CMD ["uvicorn", "hf_api:app", "--host", "0.0.0.0", "--port", "8008"] |