samarth-ht commited on
Commit
6a3e660
·
1 Parent(s): e11256b

docker error fix

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -5
Dockerfile CHANGED
@@ -13,14 +13,24 @@ LABEL description="Scraibe is a tool for automatic speech recognition and speake
13
  LABEL url="https://github.com/JSchmie/ScrAIbe"
14
 
15
  # Set up a new user named "hyathi" with user ID 1001
 
16
  RUN useradd -m -u 1000 hyathi
17
- # Switch to the new user
18
 
 
 
 
 
 
 
 
19
  USER hyathi
 
20
  # Set home to the user's home directory
21
  ENV HOME=/home/hyathi \
22
  PATH=/home/hyathi/.local/bin:$PATH
23
- # Set the working directory to the user's home directory
 
 
24
 
25
  # Install dependencies
26
  WORKDIR $HOME/app
@@ -37,11 +47,12 @@ COPY README.md /app/README.md
37
  COPY scraibe /app/scraibe
38
 
39
  #Installing all necessary dependencies and running the application with a personalised Hugging-Face-Token
40
- RUN apt update -y && apt upgrade -y && \
41
- apt install -y libsm6 libxrender1 libfontconfig1 && \
42
- apt clean && \
43
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
44
 
 
45
  RUN conda update --all && \
46
  # conda install -y pip ffmpeg && \
47
  conda install -c conda-forge libsndfile && \
 
13
  LABEL url="https://github.com/JSchmie/ScrAIbe"
14
 
15
  # Set up a new user named "hyathi" with user ID 1001
16
+ # Set up a new user named "hyathi" with user ID 1000
17
  RUN useradd -m -u 1000 hyathi
 
18
 
19
+ # Install sudo and add user to sudoers group
20
+ RUN apt update -y && apt install -y sudo
21
+
22
+ # Allow the user to run apt commands without a password prompt by modifying sudoers file
23
+ RUN echo "hyathi ALL=(ALL) NOPASSWD: /usr/bin/apt" >> /etc/sudoers
24
+
25
+ # Switch to the new user
26
  USER hyathi
27
+
28
  # Set home to the user's home directory
29
  ENV HOME=/home/hyathi \
30
  PATH=/home/hyathi/.local/bin:$PATH
31
+
32
+ # Install dependencies (using sudo for apt commands)
33
+
34
 
35
  # Install dependencies
36
  WORKDIR $HOME/app
 
47
  COPY scraibe /app/scraibe
48
 
49
  #Installing all necessary dependencies and running the application with a personalised Hugging-Face-Token
50
+ RUN sudo apt update -y && sudo apt upgrade -y && \
51
+ sudo apt install -y libsm6 libxrender1 libfontconfig1 && \
52
+ sudo apt clean && \
53
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
54
 
55
+
56
  RUN conda update --all && \
57
  # conda install -y pip ffmpeg && \
58
  conda install -c conda-forge libsndfile && \