meegar commited on
Commit
7a6733d
·
verified ·
1 Parent(s): 94b8f54

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +42 -11
Dockerfile CHANGED
@@ -1,16 +1,47 @@
1
- # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
 
 
 
 
3
 
4
- FROM python:3.9
 
 
 
 
 
 
 
 
 
5
 
6
- RUN useradd -m -u 1000 user
7
- USER user
8
- ENV PATH="/home/user/.local/bin:$PATH"
 
 
 
 
 
9
 
10
- WORKDIR /app
 
 
 
 
 
 
11
 
12
- COPY --chown=user ./requirements.txt requirements.txt
13
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
 
 
 
 
 
 
14
 
15
- COPY --chown=user . /app
16
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ x-logging:
2
+ &default-logging
3
+ logging:
4
+ driver: json-file
5
+ options:
6
+ max-size: 100M
7
 
8
+ services:
9
+ server:
10
+ image: judge0/judge0:1.13.1-extra
11
+ volumes:
12
+ - ./judge0.conf:/judge0.conf:ro
13
+ ports:
14
+ - "2358:2358"
15
+ privileged: true
16
+ <<: *default-logging
17
+ restart: always
18
 
19
+ workers:
20
+ image: judge0/judge0:1.13.1-extra
21
+ command: ["./scripts/workers"]
22
+ volumes:
23
+ - ./judge0.conf:/judge0.conf:ro
24
+ privileged: true
25
+ <<: *default-logging
26
+ restart: always
27
 
28
+ db:
29
+ image: postgres:16.2
30
+ env_file: judge0.conf
31
+ volumes:
32
+ - data:/var/lib/postgresql/data/
33
+ <<: *default-logging
34
+ restart: always
35
 
36
+ redis:
37
+ image: redis:7.2.4
38
+ command: [
39
+ "bash", "-c",
40
+ 'docker-entrypoint.sh --appendonly no --requirepass "$$REDIS_PASSWORD"'
41
+ ]
42
+ env_file: judge0.conf
43
+ <<: *default-logging
44
+ restart: always
45
 
46
+ volumes:
47
+ data: