THED2 commited on
Commit
0183872
·
verified ·
1 Parent(s): 67d239d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:22.04
2
+
3
+ # Interactive prompts ko disable karne ke liye
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+
6
+ # Zaroori tools 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
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Code-server install karna
16
+ RUN curl -fsSL https://code-server.dev/install.sh | sh
17
+
18
+ # Hugging Face ke liye user setup
19
+ RUN useradd -m -u 1000 user
20
+ RUN echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
21
+
22
+ USER user
23
+ ENV HOME=/home/user \
24
+ PATH=/home/user/.local/bin:$PATH
25
+
26
+ WORKDIR $HOME/app
27
+
28
+ # Pehle requirements aur app files copy karenge
29
+ COPY --chown=user . $HOME/app
30
+
31
+ # Python packages install karna
32
+ RUN pip3 install --no-cache-dir -r requirements.txt
33
+
34
+ # Gradio default port 7860 use karta hai, isi par app chalegi
35
+ CMD ["python3", "app.py"]