Shinhati2023 commited on
Commit
fe03ff1
·
verified ·
1 Parent(s): 0ca728f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -8
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # Use NVIDIA CUDA base for GPU support (Ubuntu 22.04)
2
  FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
3
 
4
  # Set non-interactive installation
@@ -23,15 +23,14 @@ RUN apt-get update && apt-get install -y \
23
  ca-certificates \
24
  && rm -rf /var/lib/apt/lists/*
25
 
26
- # 2. Install KasmVNC (The Streaming Engine)
27
- # FIX: Updated to v1.3.1 and switched to the "jammy" (Ubuntu 22.04) build
28
  RUN wget https://github.com/kasmtech/KasmVNC/releases/download/v1.3.1/kasmvncserver_jammy_1.3.1_amd64.deb && \
29
  apt-get install -y ./kasmvncserver_*.deb && \
30
  rm kasmvncserver_*.deb
31
 
32
- # 3. Install Python Requirements
33
-
34
- RUN pip install requests yt-dlp
35
 
36
  # 4. Setup User
37
  RUN useradd -m -u 1000 user
@@ -39,17 +38,19 @@ USER user
39
  ENV HOME=/home/user
40
  WORKDIR $HOME
41
 
42
- # 5. Download Chromium Automatically
 
43
  RUN wget -q https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F1300000%2Fchrome-linux.zip?alt=media -O chrome-linux.zip && \
44
  unzip -q chrome-linux.zip && \
45
  rm chrome-linux.zip && \
 
46
  mv chrome-linux /home/user/chrome-linux
47
 
48
  # 6. Prepare the Start Script
49
  COPY --chown=user start.sh /start.sh
50
  RUN chmod +x /start.sh
51
 
52
- # 7. Expose the Hugging Face port
53
  EXPOSE 7860
54
 
55
  CMD ["/start.sh"]
 
1
+ # Use NVIDIA CUDA base for GPU support
2
  FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
3
 
4
  # Set non-interactive installation
 
23
  ca-certificates \
24
  && rm -rf /var/lib/apt/lists/*
25
 
26
+ # 2. Install KasmVNC
 
27
  RUN wget https://github.com/kasmtech/KasmVNC/releases/download/v1.3.1/kasmvncserver_jammy_1.3.1_amd64.deb && \
28
  apt-get install -y ./kasmvncserver_*.deb && \
29
  rm kasmvncserver_*.deb
30
 
31
+ # 3. Install Python libraries directly (No file needed)
32
+ # This removes the need for 'requirements.txt' to exist, preventing that error.
33
+ RUN pip3 install requests yt-dlp
34
 
35
  # 4. Setup User
36
  RUN useradd -m -u 1000 user
 
38
  ENV HOME=/home/user
39
  WORKDIR $HOME
40
 
41
+ # 5. Download Chromium (With Error Checking)
42
+ # We unzip, list files to be sure, and then move correctly.
43
  RUN wget -q https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F1300000%2Fchrome-linux.zip?alt=media -O chrome-linux.zip && \
44
  unzip -q chrome-linux.zip && \
45
  rm chrome-linux.zip && \
46
+ # The folder inside is usually named 'chrome-linux'
47
  mv chrome-linux /home/user/chrome-linux
48
 
49
  # 6. Prepare the Start Script
50
  COPY --chown=user start.sh /start.sh
51
  RUN chmod +x /start.sh
52
 
53
+ # 7. Expose Port
54
  EXPOSE 7860
55
 
56
  CMD ["/start.sh"]