|
|
|
FROM python:3.10 |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
git \ |
|
git-lfs \ |
|
ffmpeg \ |
|
libsm6 \ |
|
libxext6 \ |
|
cmake \ |
|
rsync \ |
|
libgl1-mesa-glx |
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
RUN pip install --upgrade pip |
|
RUN pip install --upgrade transformers # Upgrade transformers here |
|
|
|
RUN python -c "import transformers; print(transformers.__version__)" |
|
RUN python test_import.py |
|
RUN pip show transformers |
|
RUN python -c "from transformers import SegformerForImageSegmentation" |
|
RUN pip install torch |
|
|
|
|
|
RUN pip install -r requirements.txt |
|
RUN pip install --upgrade transformers # Upgrade transformers here |
|
|
|
RUN python -c "import transformers; print(transformers.__version__)" |
|
RUN python test_import.py |
|
RUN pip install torch |
|
|
|
|
|
COPY . . |
|
COPY test_import.py |
|
|
|
CMD ["streamlit", "run", "app.py", "--server.port=8080", "--server.address=0.0.0.0"] |
|
|