GameNet-1 / Dockerfile
MAS-AI-0000's picture
Create Dockerfile
68358a6 verified
raw
history blame contribute delete
486 Bytes
# Use official Python base
FROM python:3.12
# Create and switch to a non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Working directory inside the container
WORKDIR /app
# Install dependencies
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy app files
COPY --chown=user . /app
# Run FastAPI server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]