Spaces:
Build error
Build error
mattritchey
commited on
Commit
•
56d0c88
1
Parent(s):
3c8a3a7
Create Dockerfile
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9-slim
|
2 |
+
|
3 |
+
# Install system dependencies
|
4 |
+
RUN apt-get update && apt-get install -y \
|
5 |
+
gdal-bin \
|
6 |
+
libgdal-dev \
|
7 |
+
&& rm -rf /var/lib/apt/lists/*
|
8 |
+
|
9 |
+
# Set up environment variables
|
10 |
+
ENV PYTHONUNBUFFERED=1
|
11 |
+
|
12 |
+
# Install Python dependencies
|
13 |
+
COPY requirements.txt .
|
14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
+
|
16 |
+
# Create a directory for the GeoTIFFs
|
17 |
+
RUN mkdir -p /data/cogs
|
18 |
+
|
19 |
+
# Copy the app code
|
20 |
+
COPY app.py .
|
21 |
+
|
22 |
+
# Expose port 7860 (default for Hugging Face Spaces)
|
23 |
+
EXPOSE 7860
|
24 |
+
|
25 |
+
# Start the app
|
26 |
+
CMD ["python", "app.py"]
|