-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
52 lines (43 loc) · 1.26 KB
/
Dockerfile
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
47
48
49
50
51
52
FROM ubuntu:22.04
# Setup workspace
RUN mkdir /workspace
WORKDIR /workspace
ADD ./ /workspace/
# Install dependencies
ARG DEBIAN_FRONTEND=noninteractive
RUN ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
# Change apt source to japan
# For linux host (x86_64)
RUN sed -i -e 's|archive.ubuntu.com/ubuntu|ftp.naist.jp/pub/Linux/ubuntu|g' /etc/apt/sources.list
# For linux or mac host (arm64)
RUN sed -i -e 's|ports.ubuntu.com|jp.mirror.coganng.com|g' /etc/apt/sources.list
RUN apt-get update && apt-get install -y \
curl \
git \
make \
tmux \
python3 \
python3-pip \
libopencv-dev \
xvfb \
x11-utils \
libgl1-mesa-glx \
libgl1-mesa-dri \
libhdf5-dev \
libsndfile1 \
pulseaudio \
&& rm -rf /var/lib/apt/lists/*
# Install python dependencies
RUN python3.10 -m pip install poetry && \
poetry install && \
echo "cd /workspace && $(poetry env activate)" >> ~/.bashrc && \
echo "eval '$(poetry run python scripts/launch.py -sc install=bash)'" >> ~/.bashrc
# Copy Xvfb script
COPY scripts/start-xvfb.sh /start-xvfb.sh
RUN chmod +x /start-xvfb.sh
# Set DISPLAY environment variable
ENV DISPLAY=:99
# Set entrypoint to run Xvfb
ENTRYPOINT ["/start-xvfb.sh"]
# Default command (can be overridden)
CMD ["/bin/bash"]