Spaces:
Build error
Build error
Commit ·
ad1a3b2
1
Parent(s): 88e372c
- Dockerfile +6 -17
Dockerfile
CHANGED
|
@@ -1,29 +1,18 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
ARG QUARTO_VERSION="1.4.550"
|
| 4 |
|
| 5 |
# Use the Quarto base image
|
| 6 |
FROM ghcr.io/quarto-dev/quarto:${QUARTO_VERSION} AS builder
|
| 7 |
|
| 8 |
-
# Set working directory
|
| 9 |
-
WORKDIR /app
|
| 10 |
-
|
| 11 |
-
# Copy application source
|
| 12 |
COPY src /app
|
|
|
|
| 13 |
|
| 14 |
-
# Install Python
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 18 |
-
|
| 19 |
COPY requirements.txt /app/
|
| 20 |
-
RUN pip3 install -
|
| 21 |
|
| 22 |
-
# Render the Quarto project
|
| 23 |
RUN quarto render .
|
| 24 |
|
| 25 |
-
# Expose the port
|
| 26 |
EXPOSE 7860
|
| 27 |
-
|
| 28 |
-
# Run the HTTP server
|
| 29 |
-
CMD ["python3", "-m", "http.server", "7860", "--directory", "_site"]
|
|
|
|
|
|
|
|
|
|
| 1 |
ARG QUARTO_VERSION="1.4.550"
|
| 2 |
|
| 3 |
# Use the Quarto base image
|
| 4 |
FROM ghcr.io/quarto-dev/quarto:${QUARTO_VERSION} AS builder
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
COPY src /app
|
| 7 |
+
WORKDIR /app
|
| 8 |
|
| 9 |
+
# Install Python requirements
|
| 10 |
+
USER root
|
| 11 |
+
RUN apt-get update && apt-get install -y python3 python3-pip
|
|
|
|
|
|
|
| 12 |
COPY requirements.txt /app/
|
| 13 |
+
RUN pip3 install -r requirements.txt
|
| 14 |
|
|
|
|
| 15 |
RUN quarto render .
|
| 16 |
|
|
|
|
| 17 |
EXPOSE 7860
|
| 18 |
+
CMD ["python3", "-m", "http.server", "7860", "--directory", "_site"]
|
|
|
|
|
|