blanchon commited on
Commit
83d9969
1 Parent(s): 1366aa0

Docker and docker compote

Browse files
Files changed (2) hide show
  1. Dockerfile +14 -0
  2. docker-compose.yml +14 -0
Dockerfile ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime
2
+
3
+ # Install dependencies
4
+ COPY requirements.txt /tmp/requirements.txt
5
+ RUN python -m pip install --upgrade pip && \
6
+ python -m pip install -r /tmp/requirements.txt
7
+
8
+ # Copy source code
9
+ WORKDIR /app
10
+ RUN mkdir /app/cache
11
+ COPY ./app.py /app/app.py
12
+
13
+ # Run the application
14
+ CMD ["python", "app.py"]
docker-compose.yml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ gradio:
3
+ build: .
4
+ ports:
5
+ - "7860:7860"
6
+ volumes:
7
+ - ./cache:/app/cache
8
+ deploy:
9
+ resources:
10
+ reservations:
11
+ devices:
12
+ - driver: nvidia
13
+ count: 1
14
+ capabilities: [ gpu ]