Spaces:
Configuration error
Configuration error
Update Dockerfile
Browse files- Dockerfile +15 -14
Dockerfile
CHANGED
|
@@ -1,26 +1,27 @@
|
|
| 1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
| 2 |
|
| 3 |
-
FROM python:3.10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
# Sistem güncellemeleri ve temel bağımlılıkların kurulumu
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
build-essential \
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
-
# Kullanıcı oluştur ve ayarla
|
| 11 |
-
RUN useradd -m -u 1000 user
|
| 12 |
-
WORKDIR /app
|
| 13 |
-
|
| 14 |
-
# Gerekli Python paketlerini yükle
|
| 15 |
-
COPY --chown=user ./requirements.txt requirements.txt
|
| 16 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 17 |
|
| 18 |
-
# Uygulama dosyalarını kopyala
|
| 19 |
-
COPY --chown=user . /app
|
| 20 |
|
| 21 |
-
# Kullanıcıya geçiş yap
|
| 22 |
-
USER user
|
| 23 |
|
| 24 |
-
# Uvicorn ile uygulamayı başlat
|
| 25 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
|
| 26 |
|
|
|
|
| 1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
| 2 |
|
| 3 |
+
FROM python:3.10-bullseye
|
| 4 |
+
|
| 5 |
+
ADD main.py .
|
| 6 |
+
WORKDIR /app
|
| 7 |
+
|
| 8 |
+
COPY requirements.txt requirements.txt
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
RUN pip install -r requirements.txt
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
COPY . .
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0" , "--port", "8000"]
|
| 18 |
|
| 19 |
# Sistem güncellemeleri ve temel bağımlılıkların kurulumu
|
| 20 |
RUN apt-get update && apt-get install -y \
|
| 21 |
build-essential \
|
| 22 |
&& rm -rf /var/lib/apt/lists/*
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
|
|
|
|
|
|
| 25 |
|
|
|
|
|
|
|
| 26 |
|
|
|
|
|
|
|
| 27 |
|