File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,13 +55,14 @@ WORKDIR /terratorch
5555
5656ENV HF_HOME=/app/models/huggingface_cache \
5757 TERRATORCH_SEGMENTATION_IO_PROCESSOR_CONFIG='{"output_path": "/data/output/"}' \
58- PATH="/home/appuser/.local/bin:${PATH}"
58+ PATH="/home/appuser/.local/bin:${PATH}" \
59+ PYTHONUNBUFFERED=1 \
60+ PYTHONDONTWRITEBYTECODE=1
5961
6062# Install Python dependencies with cache mount for faster rebuilds
6163RUN pip install --upgrade pip && \
6264 pip install --timeout=7200 \
6365 terratorch[vllm]==1.2.1 \
64- # "vllm>=0.6.0" \
6566 'diffusers<=0.34.0' \
6667 ipython \
6768 nbformat \
@@ -121,8 +122,11 @@ RUN chmod +x /app/entrypoint.sh /app/healthcheck.sh
121122
122123# Switch to non-root user
123124USER appuser
125+
124126WORKDIR /opt/app-root/src
127+
125128EXPOSE 8000
129+
126130HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \
127131 CMD ["/bin/bash", "/app/healthcheck.sh"]
128132
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4- if [ " $APP_MODE " = " v " ]; then
5- echo " Starting in Standard TerraTorch mode... "
4+ if [ " $APP_MODE " = " vllm " ]; then
5+ echo " Starting in VLLM mode"
66
77 MODEL_NAME=${MODEL_NAME:- " ibm-nasa-geospatial/Prithvi-EO-2.0-300M-TL-Sen1Floods11" }
88 PLUGIN_NAME=${PLUGIN_NAME:- " terratorch_segmentation" }
9- HF_HOME=${HF_HOME:- " /workspace /models/huggingface_cache" }
9+ HF_HOME=${HF_HOME:- " /app /models/huggingface_cache" }
1010
1111 echo " =========================================="
1212 echo " vLLM Prithvi Flood Detection Server"
@@ -18,8 +18,8 @@ if [ "$APP_MODE" = "v" ]; then
1818 echo " "
1919 # 1. Clear Hugging Face lock files
2020 # This prevents the 'OSError: PermissionError' if a previous pod crashed
21- echo " Checking for stale lock files in /workspace /models..."
22- find /workspace /models -name " *.lock" -delete
21+ echo " Checking for stale lock files in /app /models..."
22+ find /app /models -name " *.lock" -delete
2323
2424 # 2. Verify GPU availability
2525 # This logs the GPU status to help debug 'Pending' or 'Runtime' errors
You can’t perform that action at this time.
0 commit comments