-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.cpu
More file actions
35 lines (26 loc) · 1.05 KB
/
Copy pathDockerfile.cpu
File metadata and controls
35 lines (26 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Lightweight, CPU-only image. Unlike the default Dockerfile, this has no CUDA
# base image, so it builds and runs natively on any platform pip/Docker
# supports - including Apple Silicon (arm64) Macs, with no emulation needed.
FROM python:3.11-slim
WORKDIR /app
# System dependencies for C++ compilation and GDAL (rasterio)
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
cmake \
gdal-bin \
libgdal-dev \
git \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip
COPY . .
# CPU-only PyTorch wheel, so we don't pull in unused CUDA runtime libraries
RUN pip install torch --index-url https://download.pytorch.org/whl/cpu
# Install JupyterLab for interactive data science
RUN pip install jupyterlab
# Install the package in editable mode (compiles the C++ extensions)
RUN pip install -e .
# Expose Jupyter port for interactive sessions
EXPOSE 8888
# Default command: start a Jupyter server
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]