arssite commited on
Commit
f549c02
·
verified ·
1 Parent(s): 789cf3a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -8
Dockerfile CHANGED
@@ -1,13 +1,10 @@
1
- # Use Python 3.10 to match your previous logs
2
  FROM python:3.10
3
 
4
- # Set the working directory
5
  WORKDIR /code
6
 
7
- # Copy requirements first to cache dependencies
8
  COPY ./requirements.txt /code/requirements.txt
9
 
10
- # Install the CORRECT system libraries (libgl1 instead of the broken package)
11
  RUN apt-get update && apt-get install -y \
12
  ffmpeg \
13
  libsm6 \
@@ -15,13 +12,10 @@ RUN apt-get update && apt-get install -y \
15
  libgl1 \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
- # Install Python dependencies
19
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
20
 
21
- # Copy the rest of your app files
22
  COPY . .
23
 
24
- # create a user to avoid permission errors (Standard for HF Spaces)
25
  RUN useradd -m -u 1000 user
26
  USER user
27
  ENV HOME=/home/user \
@@ -30,5 +24,4 @@ ENV HOME=/home/user \
30
  WORKDIR $HOME/app
31
  COPY --chown=user . $HOME/app
32
 
33
- # Run your specific script
34
  CMD ["python", "SentimentAnalyzerUsingDistilbert.py"]
 
 
1
  FROM python:3.10
2
 
 
3
  WORKDIR /code
4
 
 
5
  COPY ./requirements.txt /code/requirements.txt
6
 
7
+ # Install system dependencies (Fixes the libgl1 error)
8
  RUN apt-get update && apt-get install -y \
9
  ffmpeg \
10
  libsm6 \
 
12
  libgl1 \
13
  && rm -rf /var/lib/apt/lists/*
14
 
 
15
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
16
 
 
17
  COPY . .
18
 
 
19
  RUN useradd -m -u 1000 user
20
  USER user
21
  ENV HOME=/home/user \
 
24
  WORKDIR $HOME/app
25
  COPY --chown=user . $HOME/app
26
 
 
27
  CMD ["python", "SentimentAnalyzerUsingDistilbert.py"]