Update Dockerfile
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
@@ -4,7 +4,7 @@ FROM ghcr.io/project-osrm/osrm-backend:latest
|
|
4 |
# Set working directory to /data
|
5 |
WORKDIR /data
|
6 |
|
7 |
-
# Install wget (
|
8 |
RUN apt-get update && apt-get install -y wget
|
9 |
|
10 |
# Download an example OSM extract (Berlin)
|
@@ -18,8 +18,11 @@ RUN osrm-extract -p /opt/car.lua berlin-latest.osm.pbf && \
|
|
18 |
osrm-partition berlin-latest.osrm && \
|
19 |
osrm-customize berlin-latest.osrm
|
20 |
|
|
|
|
|
|
|
21 |
# Expose port 7860 (Hugging Face Spaces expects the app to listen on this port)
|
22 |
EXPOSE 7860
|
23 |
|
24 |
# Start the OSRM routing engine on port 7860 using the MLD pipeline
|
25 |
-
CMD ["osrm-routed", "--algorithm", "mld", "--port", "7860", "berlin-latest.osrm"]
|
|
|
4 |
# Set working directory to /data
|
5 |
WORKDIR /data
|
6 |
|
7 |
+
# Install wget (required to download OSM data)
|
8 |
RUN apt-get update && apt-get install -y wget
|
9 |
|
10 |
# Download an example OSM extract (Berlin)
|
|
|
18 |
osrm-partition berlin-latest.osrm && \
|
19 |
osrm-customize berlin-latest.osrm
|
20 |
|
21 |
+
# Fix permissions: Make files accessible to the 'osrm' user
|
22 |
+
RUN chown -R osrm:osrm /data
|
23 |
+
|
24 |
# Expose port 7860 (Hugging Face Spaces expects the app to listen on this port)
|
25 |
EXPOSE 7860
|
26 |
|
27 |
# Start the OSRM routing engine on port 7860 using the MLD pipeline
|
28 |
+
CMD ["osrm-routed", "--algorithm", "mld", "--port", "7860", "berlin-latest.osrm"]
|