Spaces:
Sleeping
Sleeping
Upload Dockerfile
Browse files- Dockerfile +17 -0
Dockerfile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Menggunakan base image Python 3.9
|
| 2 |
+
FROM python:3.9
|
| 3 |
+
|
| 4 |
+
# Mengatur direktori kerja ke /code
|
| 5 |
+
WORKDIR /code
|
| 6 |
+
|
| 7 |
+
# Menyalin requirements.txt ke /code
|
| 8 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
+
|
| 10 |
+
# Menginstal dependensi dari requirements.txt
|
| 11 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 12 |
+
|
| 13 |
+
# Menyalin seluruh konten proyek Anda ke /code
|
| 14 |
+
COPY . /code
|
| 15 |
+
|
| 16 |
+
# CMD untuk menjalankan Gunicorn
|
| 17 |
+
CMD ["gunicorn", "app:app", "-b", "0.0.0.0:7860"]
|