FROM python:3.9 WORKDIR /code # Create a cache directory and set permissions RUN mkdir -p /code/cache && \ chmod -R 777 /code/cache # Set environment variable for the Transformers cache ENV HF_HOME=/code/cache # Install segment-anything from GitHub RUN pip install --no-cache-dir git+https://github.com/facebookresearch/segment-anything.git # Install Transformers from Hugging Face GitHub RUN pip install --no-cache-dir git+https://github.com/huggingface/transformers.git # Install datasets RUN pip install --no-cache-dir datasets # Install monai RUN pip install --no-cache-dir monai # Install patchify RUN pip install --no-cache-dir patchify COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt COPY . . EXPOSE 7860 CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]