Spaces:
Sleeping
Sleeping
Gintarė Zokaitytė commited on
Commit ·
e251a8f
1
Parent(s): f719912
Refactor Dockerfile
Browse files- Dockerfile +6 -17
Dockerfile
CHANGED
|
@@ -1,24 +1,13 @@
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
-
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
| 3 |
-
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
|
| 7 |
-
RUN --mount=type=cache,target=/root/.cache/uv \
|
| 8 |
-
--mount=type=bind,source=uv.lock,target=uv.lock \
|
| 9 |
-
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
| 10 |
-
uv sync --frozen --no-install-project
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
COPY .streamlit .streamlit
|
| 15 |
|
| 16 |
-
|
| 17 |
-
RUN
|
| 18 |
-
uv sync --frozen
|
| 19 |
|
| 20 |
-
# Expose port
|
| 21 |
EXPOSE 8501
|
| 22 |
-
|
| 23 |
-
# Run streamlit
|
| 24 |
-
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
FROM python:3.12-slim
|
|
|
|
|
|
|
| 2 |
WORKDIR /app
|
| 3 |
|
| 4 |
+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
COPY pyproject.toml uv.lock ./
|
| 7 |
+
RUN uv sync --frozen --no-install-project
|
|
|
|
| 8 |
|
| 9 |
+
COPY . .
|
| 10 |
+
RUN uv sync --frozen
|
|
|
|
| 11 |
|
|
|
|
| 12 |
EXPOSE 8501
|
| 13 |
+
CMD ["uv", "run", "streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=8501"]
|
|
|
|
|
|