CoolFace
Apppublic

meladeayol/Road_Segmentation_with_Depth_Estimation

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes
Dockerfile64 linesDownload Raw Back to root
1# Use NVIDIA CUDA base image for GPU support2FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.043 4# Set environment variables5ENV DEBIAN_FRONTEND=noninteractive6ENV PYTHONUNBUFFERED=17ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6+PTX"8 9# Install system dependencies10RUN apt-get update && apt-get install -y \11    python3 \12    python3-pip \13    python3-dev \14    git \15    wget \16    curl \17    build-essential \18    cmake \19    libgl1-mesa-glx \20    libglib2.0-0 \21    libsm6 \22    libxext6 \23    libxrender-dev \24    libgomp1 \25    libgcc-s1 \26    && rm -rf /var/lib/apt/lists/*27 28# Create working directory29WORKDIR /app30 31# Copy requirements first (for better Docker layer caching)32COPY requirements.txt .33 34# Install Python dependencies35RUN pip3 install --no-cache-dir --upgrade pip setuptools wheel36RUN pip3 install --no-cache-dir -r requirements.txt37 38 39 40 41 42# Go back to app directory43WORKDIR /app44 45# Copy the application code46COPY . .47 48# Set up DepthAnythingV249#WORKDIR /app/Depth-Anything-V250#RUN pip3 install -e .51#WORKDIR /app52 53# Create directories for models and cache54RUN mkdir -p /app/models /root/.cache55 56# Download DepthAnythingV2 weights (you can add this step or mount as volume)57# Uncomment the line below if you want to download weights during build58# RUN wget -O depth_anything_v2_metric_vkitti_vitl.pth https://huggingface.co/depth-anything/Depth-Anything-V2-Metric-VKITTI-Small/resolve/main/depth_anything_v2_metric_vkitti_vitl.pth59 60# Expose the port61EXPOSE 786062 63# Set the entry point64CMD ["python3", "enhanced_app.py"]