xauusd / Dockerfile
callernode's picture
Create Dockerfile
5ccc161 verified
Raw History Blame Contribute Delete
698 Bytes
FROM python:3.11-slim
# --- Dev Mode requirements ---
# bash (SSH), curl/wget/procps (VS Code server), git + git-lfs (push from inside the Space)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
bash git git-lfs wget curl procps && \
rm -rf /var/lib/apt/lists/*
# non-root user with uid 1000, app code in /app, CMD for startup
RUN useradd -m -u 1000 user
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user . /app
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PYTHONUNBUFFERED=1
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]