55# For faster development iterations, consider using a local Conda environment on your machine with the
66# same environment.yml file.
77
8- # ===== Base image with GPU support =====
8+ # Base image with GPU support
99FROM pytorch/pytorch:2.10.0-cuda12.8-cudnn9-runtime
1010# NOTE: Uncomment the line below and comment out the line above only if you want to generate fake data.
1111# For regular use, stick to the current image. If you use the image below, make sure to also uncomment
@@ -14,14 +14,14 @@ FROM pytorch/pytorch:2.10.0-cuda12.8-cudnn9-runtime
1414
1515# FROM nvidia/cuda:12.8.0-runtime-ubuntu22.04
1616
17- # ===== Set working directory =====
17+ # Set working directory
1818WORKDIR /app
1919
20- # ===== Timezone fix =====
20+ # Timezone fix
2121ENV TZ=Europe/Zagreb
2222RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
2323
24- # ===== Install Miniconda and Git =====
24+ # Install Miniconda and Git
2525RUN apt-get update && apt-get install -y wget bzip2 git && \
2626 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
2727 bash /tmp/miniconda.sh -b -p /opt/conda && \
@@ -31,14 +31,14 @@ RUN apt-get update && apt-get install -y wget bzip2 git && \
3131# Add conda to PATH
3232ENV PATH="/opt/conda/bin:$PATH"
3333
34- # ===== Accept Conda Terms of Service =====
34+ # Accept Conda Terms of Service
3535RUN conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \
3636 conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
3737
38- # ===== Copy environment.yml first for faster rebuilds =====
38+ # Copy environment.yml first for faster rebuilds
3939COPY environment.yml /tmp/environment.yml
4040
41- # ===== Create Conda environment =====
41+ # Create Conda environment
4242# Create env
4343RUN conda env create -f /tmp/environment.yml -n hotel_management
4444
@@ -61,10 +61,10 @@ COPY pyproject.toml .
6161# Install rest
6262RUN conda run -n hotel_management pip install -r /tmp/requirements.txt
6363
64- # ===== Use the environment for all container commands =====
64+ # Use the environment for all container commands
6565SHELL ["conda" , "run" , "-n" , "hotel_management" , "/bin/bash" , "-c" ]
6666
67- # ===== Copy the code =====
67+ # Copy the code
6868COPY ml ./ml
6969COPY pipelines ./pipelines
7070COPY scripts ./scripts
@@ -73,11 +73,11 @@ COPY ml_service ./ml_service
7373# Install the package
7474RUN conda run -n hotel_management pip install -e .
7575
76- # ===== Expose ports =====
76+ # Expose ports
7777EXPOSE 8000
7878EXPOSE 8050
7979
80- # ===== Run all services =====
80+ # Run all services
8181CMD bash -c "\
8282 uvicorn ml_service.backend.main:app --reload --host 0.0.0.0 --port 8000 & \
8383 python -m ml_service.frontend.app --host 0.0.0.0 --port 8050 & \
0 commit comments