File size: 792 Bytes
aa4251c
 
1e1e682
aa4251c
 
ed04f51
 
c37bb91
1e1e682
c37bb91
1e1e682
 
 
 
 
 
822fff4
1e1e682
 
 
974d6bf
a47a354
1e1e682
 
aa4251c
1e1e682
974d6bf
11d112f
aa4251c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM tensorflow/tensorflow:1.14.0-gpu-py3

# Copy requirements first for efficient caching
COPY requirements.txt ./

RUN rm /etc/apt/sources.list.d/cuda.list
RUN rm /etc/apt/sources.list.d/nvidia-ml.list

# Update and install system dependencies
RUN apt-get update -o Acquire::AllowInsecureRepositories=true \
    && apt-get install -y libglib2.0-0 libgl1-mesa-glx ffmpeg \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# Upgrade pip and install python packages
RUN pip install --upgrade pip \
    && pip install --upgrade pip setuptools wheel \
    && pip install --no-cache-dir -r requirements.txt \
    && pip install jupyter

WORKDIR /app
EXPOSE 7860

# Copy the rest of the files
COPY . .

RUN chmod -R 777 /app/

CMD ["streamlit", "run", "app.py", "--server.port", "7860"]