Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python 3.9 versiyasini asos qilib olamiz
2
+ FROM python:3.9
3
+
4
+ # Ishchi papka yaratamiz
5
+ WORKDIR /code
6
+
7
+ # Kutubxonalar ro'yxatini ko'chirib o'tkazamiz
8
+ COPY ./requirements.txt /code/requirements.txt
9
+
10
+ # Kerakli kutubxonalarni o'rnatamiz
11
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
+
13
+ # Qolgan barcha fayllarni ko'chirib o'tkazamiz
14
+ COPY . /code/
15
+
16
+ # Konteyner qaysi portni eshitishini aytamiz (Hugging Face uchun odatda 7860)
17
+ EXPOSE 7860
18
+
19
+ # Konteyner ishga tushganda qaysi buyruqni bajarish kerakligini aytamiz
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]