Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +34 -0
Dockerfile
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM ubuntu:22.04
|
2 |
+
|
3 |
+
# Prevent interactive prompts during installation
|
4 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
5 |
+
|
6 |
+
# Install system dependencies
|
7 |
+
RUN apt-get update && apt-get install -y \
|
8 |
+
python3 \
|
9 |
+
python3-pip \
|
10 |
+
libreoffice \
|
11 |
+
libreoffice-script-provider-python \
|
12 |
+
&& rm -rf /var/lib/apt/lists/*
|
13 |
+
|
14 |
+
# Set working directory
|
15 |
+
WORKDIR /app
|
16 |
+
|
17 |
+
# Copy application files
|
18 |
+
COPY requirements.txt .
|
19 |
+
COPY app.py .
|
20 |
+
|
21 |
+
# Install Python dependencies
|
22 |
+
RUN pip3 install --no-cache-dir -r requirements.txt
|
23 |
+
|
24 |
+
# Create directories for file handling
|
25 |
+
RUN mkdir -p uploads outputs
|
26 |
+
|
27 |
+
# Expose port
|
28 |
+
EXPOSE 8000
|
29 |
+
|
30 |
+
# Start script to run both unoserver and FastAPI
|
31 |
+
COPY start.sh .
|
32 |
+
RUN chmod +x start.sh
|
33 |
+
|
34 |
+
CMD ["./start.sh"]
|