mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
26 lines
802 B
Docker
26 lines
802 B
Docker
# Pull base image
|
|
FROM python:3.10.12-slim-buster
|
|
|
|
# Set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
# Set work directory to the root of your project
|
|
WORKDIR /Model
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y netcat-openbsd
|
|
|
|
# Install python dependencies
|
|
COPY ./backend/requirements/base.txt ./backend/requirements/base.txt
|
|
COPY ./model_data/requirements/requirements.txt ./model_data/requirements/requirements.txt
|
|
RUN pip install --upgrade pip
|
|
RUN pip install -r backend/requirements/base.txt
|
|
RUN pip install -r model_data/requirements/requirements.txt
|
|
|
|
# Copy project
|
|
COPY ./backend ./backend
|
|
COPY ./model_data ./model_data
|
|
|
|
# command to run on container start
|
|
CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|