keyuedeng commited on
Commit
2450353
·
1 Parent(s): 79d3777

Use Docker with Python 3.10 for fastai compatibility

Browse files
Files changed (3) hide show
  1. Dockerfile +22 -0
  2. README.md +1 -2
  3. requirements.txt +2 -2
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ RUN apt-get update && apt-get install -y \
6
+ git \
7
+ git-lfs \
8
+ ffmpeg \
9
+ libsm6 \
10
+ libxext6 \
11
+ libgl1-mesa-glx \
12
+ && rm -rf /var/lib/apt/lists/* \
13
+ && git lfs install
14
+
15
+ COPY requirements.txt .
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ COPY . .
19
+
20
+ EXPOSE 7860
21
+
22
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -3,8 +3,7 @@ title: Ml Practise
3
  emoji: 🔥
4
  colorFrom: red
5
  colorTo: red
6
- sdk: gradio
7
- sdk_version: 3.50.2
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
3
  emoji: 🔥
4
  colorFrom: red
5
  colorTo: red
6
+ sdk: docker
 
7
  app_file: app.py
8
  pinned: false
9
  license: apache-2.0
requirements.txt CHANGED
@@ -4,5 +4,5 @@ gradio==3.50.2
4
  ipython
5
  fastprogress
6
  Pillow
7
- torch
8
- torchvision
 
4
  ipython
5
  fastprogress
6
  Pillow
7
+ torch==2.0.1
8
+ torchvision==0.15.2