Spaces:
Running
Running
File size: 662 Bytes
b11d3eb 121c98d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 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"] |