Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -27
Dockerfile
CHANGED
|
@@ -1,27 +1,7 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
RUN apt-get update \
|
| 9 |
-
&& apt-get install -y --no-install-recommends \
|
| 10 |
-
build-essential \
|
| 11 |
-
gcc \
|
| 12 |
-
libssl-dev \
|
| 13 |
-
libffi-dev \
|
| 14 |
-
python3-dev \
|
| 15 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
-
|
| 17 |
-
COPY requirements.txt ./
|
| 18 |
-
COPY src/ ./src/
|
| 19 |
-
|
| 20 |
-
# 2. Install Python deps
|
| 21 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 22 |
-
|
| 23 |
-
EXPOSE 8501
|
| 24 |
-
|
| 25 |
-
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 26 |
-
|
| 27 |
-
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
WORKDIR /app
|
| 3 |
+
COPY requirements.txt .
|
| 4 |
+
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
|
| 5 |
+
&& pip install --no-cache-dir -r requirements.txt
|
| 6 |
+
COPY . .
|
| 7 |
+
CMD ["uvicorn","main:app","--host","0.0.0.0","--port","7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|