THED2 commited on
Commit
92a3707
·
verified ·
1 Parent(s): 6252a49

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -3
Dockerfile CHANGED
@@ -3,11 +3,15 @@ FROM ubuntu:22.04
3
  # Interactive prompts ko disable karne ke liye
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
- # Zaroori tools aur code-server (VS Code) install karne ke liye
7
  RUN apt-get update && apt-get install -y \
8
  curl \
9
  git \
10
  sudo \
 
 
 
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  # Code-server install karna
@@ -16,7 +20,7 @@ RUN curl -fsSL https://code-server.dev/install.sh | sh
16
  # Hugging Face ke liye user setup
17
  RUN useradd -m -u 1000 user
18
 
19
- # === UPDATE: Is line se 'user' ko bina password ke sudo access mil jayega ===
20
  RUN echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
21
 
22
  # User aur environment permissions setup karna
@@ -26,5 +30,11 @@ ENV HOME=/home/user \
26
 
27
  WORKDIR $HOME/app
28
 
29
- # VS Code ko port 7860 par run karne ki command
 
 
 
 
 
 
30
  CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none", "."]
 
3
  # Interactive prompts ko disable karne ke liye
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
+ # Zaroori system tools, Python aur code-server dependencies install karne ke liye
7
  RUN apt-get update && apt-get install -y \
8
  curl \
9
  git \
10
  sudo \
11
+ python3 \
12
+ python3-pip \
13
+ wget \
14
+ unzip \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
  # Code-server install karna
 
20
  # Hugging Face ke liye user setup
21
  RUN useradd -m -u 1000 user
22
 
23
+ # User ko bina password ke sudo access dena taaki SDK install ho sake
24
  RUN echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
25
 
26
  # User aur environment permissions setup karna
 
30
 
31
  WORKDIR $HOME/app
32
 
33
+ # Python dependencies install karna
34
+ RUN pip3 install --no-cache-dir gradio requests duckduckgo_search beautifulsoup4
35
+
36
+ # Pure workspace ki ownership user ko dena
37
+ COPY --chown=user:user . .
38
+
39
+ # VS Code ko port 7860 par run karne ki command aur workspace environment setup
40
  CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none", "."]