danicor commited on
Commit
5ce5971
·
verified ·
1 Parent(s): b414bb0

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM python:3.10-slim
3
+
4
+ # نصب git و pip tools
5
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6
+
7
+ # کلون کردن ریپو CelebAMask-HQ
8
+ RUN git clone https://github.com/switchablenorms/CelebAMask-HQ.git /home/user/CelebAMask-HQ
9
+
10
+ # مسیر PYTHONPATH
11
+ ENV PYTHONPATH="/home/user/CelebAMask-HQ:${PYTHONPATH}"
12
+
13
+ # نصب پکیج‌ها
14
+ COPY requirements.txt /tmp/requirements.txt
15
+ RUN pip install --no-cache-dir -r /tmp/requirements.txt
16
+
17
+ # ست کردن مسیر کاری
18
+ WORKDIR /home/user/app
19
+
20
+ # کپی اپلیکیشن
21
+ COPY app.py /home/user/app/app.py
22
+
23
+ # دستور پیش‌فرض اجرای اپ
24
+ CMD ["python", "app.py"]