tostido's picture
Build MeshScale CPU worker template
96ef23c verified
Raw
History Blame Contribute Delete
590 Bytes
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
ENV KEY_FARM_ROOT=/data/farm
ENV KEY_FARM_FORMATION=cpu-worker
ENV MESHSCALE_FULL_KEY_REQUIREMENTS=1
WORKDIR /app
COPY . /app
RUN python -m pip install --upgrade pip \
&& python -m pip install --no-cache-dir -r meshscale_worker_space/requirements.txt \
&& if [ "$MESHSCALE_FULL_KEY_REQUIREMENTS" = "1" ] && [ -f requirements.txt ]; then \
python -m pip install --no-cache-dir -r requirements.txt; \
fi
CMD ["python", "-m", "uvicorn", "meshscale_worker_space.app:app", "--host", "0.0.0.0", "--port", "7860"]