File size: 831 Bytes
61a91b2
 
a4998c6
 
 
 
acb810e
 
a4998c6
7d03f73
 
0172758
084153d
7d03f73
3ae8b30
 
 
 
 
 
7d03f73
597ce80
a4998c6
3ae8b30
 
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
# Sử dụng Python 3.9
FROM python:3.9-slim

# Thiết lập thư mục làm việc
WORKDIR /app

# Cài đặt Jupyter và các dependencies
RUN pip install --no-cache-dir jupyter

# Tạo thư mục /.local với quyền hạn đúng
RUN mkdir -p /.local && chmod 777 /.local
RUN mkdir -p /app && chmod 777 /app
RUN mkdir -p /.cache && chmod 777 /.cache

# Sao chép tệp requirements.txt vào thư mục làm việc
COPY requirements.txt .

# Cài đặt các dependencies từ requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Mở cổng 7860, nơi Jupyter sẽ chạy
EXPOSE 7860

# Chạy lệnh để khởi động Jupyter Server với token cứng
CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--port=7860", "--allow-root", "--NotebookApp.token='0429d4776d1540fcda06f9fe57bdc122c2cbd7ea4f78ea76'"]