# Use the official Python image as a base FROM python:3.11.7-slim COPY requirements.txt . # Set the working directory WORKDIR /app ## Copy the environment file COPY requirements.txt /app # Create the conda environment #RUN conda env create -f environment.yml && \ # conda clean -afy # Set the environment path #ENV PATH /opt/conda/envs/maxi_env/bin:$PATH # Activate the conda environment #SHELL ["conda", "run", "-n", "maxi_env", "/bin/bash", "-c"] RUN apt-get update && apt-get install -y gcc && \ pip install -r /app/requirements.txt # https://github.com/gradio-app/gradio/issues/3693#issuecomment-1745577523 #!mkdir -m 700 flagged # Copy the current directory contents into the container at /app COPY . /app #ADD learner.pkl /app/learner.pkl #ADD predictor.pkl /app/predictor.pkl #COPY models /app/models #COPY utils /app/utils #ADD metadata.json /app/metadata.json #COPY . . COPY .streamlit /app #ENV PATH="/usr/bin/python3:${PATH}" EXPOSE 7070 # Specify the command to run on container start #CMD ["streamlit", "run", "ChatDoctor.py"] #CMD ["/bin/bash"] # Interact with your docker image #docker run --rm -it you-docker-image bash ENTRYPOINT [ "streamlit", "run" ] CMD [ "ChatDoctor.py", "--server.headless", "true", "--server.fileWatcherType", "none", "--browser.gatherUsageStats", "false"]