Spaces:
Running
Running
Download Dockerfile from Abhises/osrm-server: direct link, hf CLI and curl.
- Browser
- Download file 662 Bytes
-
https://huggingface.co/spaces/Abhises/osrm-server/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Abhises/osrm-server/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Abhises/osrm-server/resolve/main/Dockerfile
662 Bytes
| # Use the official OSRM backend image | |
| FROM osrm/osrm-backend:latest | |
| # 1. Create a non-root user (Required by Hugging Face security) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # 2. Copy the pre-processed data | |
| # Ensure the folder on your PC is named 'osrm-data' | |
| COPY --chown=user:user ./osrm-data /home/user/app/osrm-data | |
| # 3. Inform HF about the port (HF uses 7860) | |
| EXPOSE 7860 | |
| # 4. Start the server | |
| # CHANGED: We are now using "ch" instead of "mld" to match your data | |
| CMD ["osrm-routed", "--algorithm", "ch", "--port", "7860", "/home/user/app/osrm-data/senegal-and-gambia-latest.osrm"] |