Fred808 commited on
Commit
e9dfe97
·
verified ·
1 Parent(s): 7a0c684

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -47
Dockerfile CHANGED
@@ -1,47 +1,22 @@
1
- # Use Python 3.9 slim as base
2
- FROM python:3.9-slim
3
-
4
- # Set environment variables
5
- ENV PYTHONUNBUFFERED=1
6
- ENV PYTHONPATH=/app
7
-
8
- # Set working directory
9
- WORKDIR /app
10
-
11
- # Install system dependencies including QEMU
12
- RUN apt-get update && apt-get install -y \
13
- gcc \
14
- python3-dev \
15
- qemu-system-x86 \
16
- && rm -rf /var/lib/apt/lists/*
17
-
18
- # Copy setup files
19
- COPY setup.py .
20
- COPY requirements.txt .
21
- COPY README.md .
22
-
23
- # Install package in editable mode
24
- RUN pip install -e .
25
-
26
- # Copy the package
27
- COPY FServe FServe/
28
- COPY qemu qemu/
29
- COPY helium helium/
30
- COPY virtual_gpu_driver virtual_gpu_driver/
31
-
32
- # Create necessary directories
33
- RUN mkdir -p /tmp/helium
34
- RUN mkdir -p /app/storage
35
-
36
- # Create non-root user
37
- RUN useradd -m -u 1000 user && \
38
- chown -R user:user /app /tmp/helium
39
-
40
- # Switch to non-root user
41
- USER user
42
-
43
- # Expose web interface port
44
- EXPOSE 8080
45
-
46
- # Run the server
47
- CMD ["fserve"]
 
1
+ # QEMU Web Interface Dockerfile
2
+ FROM python:3.12-slim
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update && \
6
+ apt-get install -y qemu qemu-system-x86 qemu-utils libvirt-daemon-system libvirt-clients && \
7
+ apt-get clean && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Set workdir
10
+ WORKDIR /app
11
+
12
+ # Copy QEMU manager and web interface code
13
+ COPY . /app
14
+
15
+ # Install Python dependencies
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # Expose web interface port (adjust as needed)
19
+ EXPOSE 8080
20
+
21
+ # Default command to run the QEMU web interface
22
+ CMD ["python", "qemu/web_interface.py"]