Spaces:
Running
Running
FROM nvidia/cuda:11.3.1-base-ubuntu20.04 | |
ENV DEBIAN_FRONTEND=noninteractive \ | |
TZ=Europe/Paris | |
# Remove any third-party apt sources to avoid issues with expiring keys. | |
# Install some basic utilities | |
RUN rm -f /etc/apt/sources.list.d/*.list && \ | |
apt-get update && apt-get install -y --no-install-recommends \ | |
curl \ | |
ca-certificates \ | |
sudo \ | |
git \ | |
wget \ | |
procps \ | |
git-lfs \ | |
zip \ | |
unzip \ | |
htop \ | |
vim \ | |
nano \ | |
bzip2 \ | |
libx11-6 \ | |
build-essential \ | |
libsndfile-dev \ | |
software-properties-common \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Cài đặt Jupyter Lab | |
RUN pip3 install jupyterlab | |
# Sao chép các script vào container | |
COPY start_server.sh /start_server.sh | |
COPY on_startup.sh /on_startup.sh | |
# Thiết lập quyền thực thi cho các script | |
RUN chmod +x /start_server.sh /on_startup.sh | |
# Chạy các lệnh trong on_startup.sh với quyền root trước khi container khởi động | |
RUN /on_startup.sh | |
# Cổng mà Jupyter Lab sẽ sử dụng | |
EXPOSE 7860 | |
# Lệnh để khởi động container | |
CMD ["/start_server.sh"] | |