File size: 1,007 Bytes
736b3c0
 
23b1a6f
736b3c0
 
 
 
23b1a6f
736b3c0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23b1a6f
 
 
736b3c0
 
 
23b1a6f
736b3c0
b2c6636
23b1a6f
b2c6636
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# QEMU Web Interface Dockerfile with Unlimited Storage
FROM python:3.12-slim

# Install system dependencies with unlimited storage configuration
RUN apt-get update && \
    apt-get install -y qemu-system-x86 qemu-utils libvirt-daemon-system libvirt-clients git curl && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

# Set workdir
WORKDIR /app

# Copy application code
COPY . /app

# Install Python dependencies including HuggingFace datasets
RUN pip install --no-cache-dir -r requirements.txt


# Make the entire /app directory fully writeable for all users
RUN chmod -R 777 /app

# Create unlimited storage directories
RUN mkdir -p /tmp/hf_cache && chmod -R 777 /tmp/hf_cache

# Ensure the app runs as the same user as the Space UI
RUN useradd -m -u 1000 user
USER user

# Set environment variables for unlimited resources
ENV PYTHONUNBUFFERED=1
ENV HF_HOME=/tmp/hf_cache 

# Expose web interface port (adjust as needed)
# EXPOSE 8000

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8100"]