testvnc / Dockerfile
Duongkum999's picture
Create Dockerfile
a235198 verified
raw
history blame
1.13 kB
# Sử dụng hình ảnh Ubuntu làm cơ sở
FROM ubuntu:20.04
# Đặt biến môi trường để tránh các prompt tương tác
ENV DEBIAN_FRONTEND=noninteractive
# Cập nhật và cài đặt các gói cần thiết
RUN apt-get update && apt-get install -y \
tzdata \
python3 \
python3-pip \
wget \
curl \
git \
supervisor \
xfce4 \
xfce4-goodies \
x11vnc \
novnc \
websockify \
nginx
# Đặt múi giờ mặc định (ở đây là UTC)
RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && dpkg-reconfigure --frontend noninteractive tzdata
# Cài đặt Hugging Face Transformers
RUN pip3 install transformers
# Cài đặt các gói Python bổ sung
RUN pip3 install jupyterlab
# Tạo thư mục cho VNC và cấu hình Supervisor
RUN mkdir -p /var/run/x11vnc /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Tạo script khởi động
COPY start.sh /start.sh
RUN chmod +x /start.sh
# Mở cổng 5000 cho NoVNC
EXPOSE 5000
# Khởi động Supervisor để quản lý các dịch vụ
CMD ["/usr/bin/supervisord"]