Spaces:
Configuration error
Configuration error
Update Dockerfile
Browse files- Dockerfile +11 -5
Dockerfile
CHANGED
@@ -1,16 +1,22 @@
|
|
1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
-
FROM python:3.9
|
3 |
|
|
|
|
|
|
|
4 |
RUN useradd -m -u 1000 user
|
5 |
-
USER user
|
6 |
-
#kullanıcı olarak users atandı
|
7 |
ENV PATH="/home/user/.local/bin:$PATH"
|
8 |
-
# ^ when run as user, pip installs executables there
|
9 |
|
|
|
10 |
WORKDIR /app
|
11 |
|
|
|
12 |
COPY --chown=user ./requirements.txt requirements.txt
|
13 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
14 |
|
|
|
15 |
COPY --chown=user . /app
|
16 |
-
|
|
|
|
|
|
|
|
1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
|
|
2 |
|
3 |
+
FROM python:3.10
|
4 |
+
|
5 |
+
# Kullanıcı oluştur ve ayarla
|
6 |
RUN useradd -m -u 1000 user
|
7 |
+
USER user
|
|
|
8 |
ENV PATH="/home/user/.local/bin:$PATH"
|
|
|
9 |
|
10 |
+
# Çalışma dizinini oluştur
|
11 |
WORKDIR /app
|
12 |
|
13 |
+
# Gerekli Python paketlerini yükle
|
14 |
COPY --chown=user ./requirements.txt requirements.txt
|
15 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
16 |
|
17 |
+
# FastAPI uygulama kodlarını kopyala
|
18 |
COPY --chown=user . /app
|
19 |
+
|
20 |
+
# Uvicorn ile uygulamayı başlat
|
21 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
|
22 |
+
|