-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (45 loc) · 1.41 KB
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (45 loc) · 1.41 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
services:
tuning:
# Use pre-built image from Docker Hub
image: hyukkyukang/opadviser:latest
container_name: OpAdviser
# Keep container running
stdin_open: true
tty: true
# Install tzdata and configure timezone on startup
command: >
sh -c "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata &&
ln -snf /usr/share/zoneinfo/Asia/Seoul /etc/localtime &&
echo 'Asia/Seoul' > /etc/timezone &&
dpkg-reconfigure -f noninteractive tzdata &&
exec tail -f /dev/null"
# Mount volumes for persistence
volumes:
# Persist MySQL data
- mysql_data:/var/lib/mysql
# Mount source code to /root/Tuning (as expected by eval command)
- ./:/root/Tuning
# Also mount to /root/OpAdviser for compatibility
- ./:/root/OpAdviser
# Persist experiment results
- ./repo:/app/repo
- ./logs:/app/logs
# Resource limits (adjust based on your system)
deploy:
resources:
limits:
memory: 16G
reservations:
memory: 4G
# Environment variables
environment:
- TZ=Asia/Seoul
- MYSQL_ROOT_PASSWORD=password
- MYSQL_SOCK=/var/run/mysqld/mysqld.sock
- PYTHONPATH=/root/OpAdviser
# Expose MySQL port (optional)
ports:
- "3307:3306" # Use 3307 to avoid conflict with host MySQL
volumes:
mysql_data:
driver: local