shelby102503 commited on
Commit
b842220
·
verified ·
1 Parent(s): 82edcf1

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ # 1. Working Directory set karo
4
+ WORKDIR /code
5
+
6
+ # 2. Requirements copy aur install karo
7
+ COPY ./requirements.txt /code/requirements.txt
8
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
9
+
10
+ # 3. User Permissions (Hugging Face Security ke liye zaroori)
11
+ RUN useradd -m -u 1000 user
12
+ USER user
13
+ ENV HOME=/home/user \
14
+ PATH=/home/user/.local/bin:$PATH
15
+
16
+ # 4. App Code Setup
17
+ WORKDIR $HOME/app
18
+ COPY --chown=user . $HOME/app
19
+
20
+ # 5. Start Command (Unbuffered mode taake logs foran dikhein)
21
+ CMD ["python", "-u", "scraper.py"]