typhoon-data-analysis / Dockerfile
euler314's picture
Create Dockerfile
e4c9ad4 verified
raw
history blame
818 Bytes
FROM python:3.10-slim
WORKDIR /code
# Install system dependencies required for cartopy and other packages
RUN apt-get update && apt-get install -y \
gcc \
g++ \
libproj-dev \
proj-data \
proj-bin \
libgeos-dev \
libgeos-c1v5 \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create data directory
RUN mkdir -p /code/data
# Set environment variables
ENV DATA_PATH=/code/data
# Expose port
EXPOSE 7860
# Create entrypoint script
RUN echo '#!/bin/bash\n\
python typhoon_analysis.py --data_path=/code/data' > /code/entrypoint.sh && \
chmod +x /code/entrypoint.sh
# Set the entrypoint
ENTRYPOINT ["/code/entrypoint.sh"]