Update Dockerfile
Browse files- Dockerfile +41 -41
Dockerfile
CHANGED
|
@@ -1,41 +1,41 @@
|
|
| 1 |
-
FROM python:3.10-slim
|
| 2 |
-
|
| 3 |
-
# Set working directory
|
| 4 |
-
WORKDIR /app
|
| 5 |
-
|
| 6 |
-
# Install system dependencies
|
| 7 |
-
RUN apt-get update && apt-get install -y \
|
| 8 |
-
git \
|
| 9 |
-
libgl1
|
| 10 |
-
libglib2.0-0 \
|
| 11 |
-
libsm6 \
|
| 12 |
-
libxext6 \
|
| 13 |
-
libxrender-dev \
|
| 14 |
-
libgomp1 \
|
| 15 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
-
|
| 17 |
-
# Copy requirements first for better caching
|
| 18 |
-
COPY requirements.txt .
|
| 19 |
-
|
| 20 |
-
# Install Python dependencies
|
| 21 |
-
RUN pip install --no-cache-dir --upgrade pip && \
|
| 22 |
-
pip install --no-cache-dir -r requirements.txt
|
| 23 |
-
|
| 24 |
-
# Clone and setup body segmentation
|
| 25 |
-
RUN git clone https://github.com/TonyAssi/Segment-Body.git && \
|
| 26 |
-
cp Segment-Body/SegBody.py . && \
|
| 27 |
-
pip install -r Segment-Body/requirements.txt
|
| 28 |
-
|
| 29 |
-
# Copy application files
|
| 30 |
-
COPY app.py .
|
| 31 |
-
|
| 32 |
-
# Expose port
|
| 33 |
-
EXPOSE 7860
|
| 34 |
-
|
| 35 |
-
# Set environment variables
|
| 36 |
-
ENV PYTHONUNBUFFERED=1
|
| 37 |
-
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 38 |
-
ENV GRADIO_SERVER_PORT=7860
|
| 39 |
-
|
| 40 |
-
# Run the application
|
| 41 |
-
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
# Set working directory
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
|
| 6 |
+
# Install system dependencies
|
| 7 |
+
RUN apt-get update && apt-get install -y \
|
| 8 |
+
git \
|
| 9 |
+
libgl1 \
|
| 10 |
+
libglib2.0-0 \
|
| 11 |
+
libsm6 \
|
| 12 |
+
libxext6 \
|
| 13 |
+
libxrender-dev \
|
| 14 |
+
libgomp1 \
|
| 15 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
+
|
| 17 |
+
# Copy requirements first for better caching
|
| 18 |
+
COPY requirements.txt .
|
| 19 |
+
|
| 20 |
+
# Install Python dependencies
|
| 21 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
| 22 |
+
pip install --no-cache-dir -r requirements.txt
|
| 23 |
+
|
| 24 |
+
# Clone and setup body segmentation
|
| 25 |
+
RUN git clone https://github.com/TonyAssi/Segment-Body.git && \
|
| 26 |
+
cp Segment-Body/SegBody.py . && \
|
| 27 |
+
pip install -r Segment-Body/requirements.txt
|
| 28 |
+
|
| 29 |
+
# Copy application files
|
| 30 |
+
COPY app.py .
|
| 31 |
+
|
| 32 |
+
# Expose port
|
| 33 |
+
EXPOSE 7860
|
| 34 |
+
|
| 35 |
+
# Set environment variables
|
| 36 |
+
ENV PYTHONUNBUFFERED=1
|
| 37 |
+
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 38 |
+
ENV GRADIO_SERVER_PORT=7860
|
| 39 |
+
|
| 40 |
+
# Run the application
|
| 41 |
+
CMD ["python", "app.py"]
|