mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
add simple docker files for now
This commit is contained in:
parent
05afffc05d
commit
ac72a58213
3 changed files with 75 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
FROM python:3.10.12-slim as release
|
||||
|
||||
ARG USER=nroot
|
||||
ARG UID=1000
|
||||
ARG GID=100
|
||||
|
||||
# Install patches
|
||||
RUN apt-get update && apt-get upgrade -y \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists
|
||||
|
||||
# Install python packages
|
||||
COPY ../requirements/predictions/predictions.txt requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Create and configure non-root user
|
||||
RUN useradd \
|
||||
--create-home \
|
||||
--uid ${UID} \
|
||||
--gid ${GID} \
|
||||
--shell /bin/bash \
|
||||
${USER}
|
||||
|
||||
# Copy the project code to user home directory
|
||||
COPY --chown=${UID}:${GID} ./core /home/simulation_system/core
|
||||
COPY --chown=${UID}:${GID} ./MLModel /home/simulation_system/MLModel
|
||||
COPY --chown=${UID}:${GID} ./predictions.py /home/simulation_system/predictions.py
|
||||
|
||||
# FOR TESTING
|
||||
# COPY --chown=${UID}:${GID} ./model_build_data /home/simulation_system/model_build_data
|
||||
|
||||
# Switch user
|
||||
USER ${USER}
|
||||
WORKDIR /home/simulation_system
|
||||
|
||||
# Run the python command
|
||||
CMD ["python3", "predictions.py", "--data-path", "./model_build_data/change_data/rdsap_full/test_data.parquet"]
|
||||
37
model_data/simulation_system/Dockerfiles/Dockerfile.training
Normal file
37
model_data/simulation_system/Dockerfiles/Dockerfile.training
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
FROM python:3.10.12-slim as release
|
||||
|
||||
ARG USER=nroot
|
||||
ARG UID=1000
|
||||
ARG GID=100
|
||||
|
||||
# Install patches
|
||||
RUN apt-get update && apt-get upgrade -y \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists
|
||||
|
||||
# Install python packages
|
||||
COPY ../requirements/training/training-dev.txt requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Create and configure non-root user
|
||||
RUN useradd \
|
||||
--create-home \
|
||||
--uid ${UID} \
|
||||
--gid ${GID} \
|
||||
--shell /bin/bash \
|
||||
${USER}
|
||||
|
||||
# Copy the project code to user home directory
|
||||
COPY --chown=${UID}:${GID} ./core /home/simulation_system/core
|
||||
COPY --chown=${UID}:${GID} ./MLModel /home/simulation_system/MLModel
|
||||
COPY --chown=${UID}:${GID} ./training.py /home/simulation_system/training.py
|
||||
|
||||
# FOR TESTING
|
||||
# COPY --chown=${UID}:${GID} ./model_build_data /home/simulation_system/model_build_data
|
||||
|
||||
# Switch user
|
||||
USER ${USER}
|
||||
WORKDIR /home/simulation_system
|
||||
|
||||
# Run the python command
|
||||
CMD ["python3", "training.py", "--train-filepath", "./model_build_data/change_data/rdsap_full/train_validation_data.parquet", "--test-filepath", "./model_build_data/change_data/rdsap_full/test_data.parquet"]
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
autogluon==0.8.2
|
||||
pandas==1.5.3
|
||||
pre-commit==3.3.3
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue