Spaces:
Sleeping
Sleeping
Download Dockerfile from ME22B191/Neural_Translation: direct link, hf CLI and curl.
- Browser
- Download file 586 Bytes
-
https://huggingface.co/spaces/ME22B191/Neural_Translation/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ME22B191/Neural_Translation/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ME22B191/Neural_Translation/resolve/main/Dockerfile
586 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # 1. CPU-only torch on its own line: huge, but cached as a single reusable layer. | |
| # The CPU index drops the NVIDIA CUDA stack you don't need on a CPU server. | |
| RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu | |
| # 2. The rest of the dependencies (torch is already satisfied above). | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 3. Application code last — the layer that changes most often. | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |