CoolFace
Apppublic

Tanusree88/ViT-MRI-FineTuning

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes
Docker42 linesDownload Raw Back to root
1# Use the official Python 3.10 image2FROM python:3.103 4# Set the working directory in the container5WORKDIR /app6 7# Install system dependencies8RUN apt-get update && apt-get install -y \9    git \10    git-lfs \11    ffmpeg \12    libsm6 \13    libxext6 \14    cmake \15    rsync \16    libgl1-mesa-glx17 18# Copy requirements.txt to the working directory19COPY requirements.txt .20 21# Upgrade pip to avoid any compatibility issues22RUN pip install --upgrade pip23RUN pip install --upgrade transformers  # Upgrade transformers here24# Check transformers version25RUN python -c "import transformers; print(transformers.__version__)"26RUN python test_import.py27RUN pip show transformers28RUN python -c "from transformers import SegformerForImageSegmentation"29 30# Install the required Python packages31RUN pip install -r requirements.txt32RUN pip install --upgrade transformers  # Upgrade transformers here33# Check transformers version34RUN python -c "import transformers; print(transformers.__version__)"35RUN python test_import.py36 37# Copy the rest of the application code to the working directory38COPY . .39COPY test_import.py 40# Command to run the app with Streamlit41CMD ["streamlit", "run", "app.py", "--server.port=8080", "--server.address=0.0.0.0"]42