MisbahKhan commited on
Commit
7612ffb
·
verified ·
1 Parent(s): c010af4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -1,18 +1,18 @@
1
  # Use an official Python runtime as the base image
2
  FROM python:3.9-slim
3
 
 
 
 
 
 
 
4
  # Create a non-root user (Hugging Face Spaces requirement)
5
  RUN useradd -m -u 1000 user
6
  USER user
7
  WORKDIR /app
8
  ENV PATH="/home/user/.local/bin:$PATH"
9
 
10
- # Install system dependencies (needed for decord and other libraries)
11
- RUN apt-get update && apt-get install -y \
12
- libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev \
13
- libswscale-dev libswresample-dev libavfilter-dev \
14
- && rm -rf /var/lib/apt/lists/*
15
-
16
  # Copy requirements.txt and install dependencies
17
  COPY --chown=user ./requirements.txt requirements.txt
18
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
1
  # Use an official Python runtime as the base image
2
  FROM python:3.9-slim
3
 
4
+ # Install system dependencies as root
5
+ RUN apt-get update && apt-get install -y \
6
+ libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev \
7
+ libswscale-dev libswresample-dev libavfilter-dev \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
  # Create a non-root user (Hugging Face Spaces requirement)
11
  RUN useradd -m -u 1000 user
12
  USER user
13
  WORKDIR /app
14
  ENV PATH="/home/user/.local/bin:$PATH"
15
 
 
 
 
 
 
 
16
  # Copy requirements.txt and install dependencies
17
  COPY --chown=user ./requirements.txt requirements.txt
18
  RUN pip install --no-cache-dir --upgrade -r requirements.txt