commit2 runpod
This commit is contained in:
39
Dockerfile
Normal file
39
Dockerfile
Normal file
@@ -0,0 +1,39 @@
|
||||
FROM runpod/pytorch:2.4.0-py3.11-cuda12.4.1-devel-ubuntu22.04
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
ffmpeg \
|
||||
libsm6 \
|
||||
libxext6 \
|
||||
libxrender-dev \
|
||||
libglib2.0-0 \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements first for better caching
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Install SAM2 (if not in requirements.txt)
|
||||
RUN pip install git+https://github.com/facebookresearch/segment-anything-2.git
|
||||
|
||||
# Copy project files
|
||||
COPY . .
|
||||
|
||||
# Install project in development mode
|
||||
RUN pip install -e .
|
||||
|
||||
# Create directories for models and data
|
||||
RUN mkdir -p /app/models /app/data /app/output
|
||||
|
||||
# Set environment variables
|
||||
ENV PYTHONPATH=/app
|
||||
ENV CUDA_VISIBLE_DEVICES=0
|
||||
|
||||
# Default command
|
||||
CMD ["/bin/bash"]
|
||||
Reference in New Issue
Block a user