Shinhati2023 commited on
Commit
49a7e84
·
verified ·
1 Parent(s): 7ef7afe

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -9
Dockerfile CHANGED
@@ -5,10 +5,10 @@ FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
  # 1. Install System Dependencies
8
- # Added 'python3-pip' so we can install requirements later
9
  RUN apt-get update && apt-get install -y \
10
  wget \
11
  curl \
 
12
  xz-utils \
13
  xvfb \
14
  libgbm1 \
@@ -23,26 +23,29 @@ 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
  RUN wget https://github.com/kasmtech/KasmVNC/releases/download/v1.1.0/kasmvncserver_focal_1.1.0_amd64.deb && \
28
  apt-get install -y ./kasmvncserver_*.deb && \
29
  rm kasmvncserver_*.deb
30
 
31
- # --- INSERTED SECTION: PYTHON REQUIREMENTS ---
32
  COPY requirements.txt /tmp/requirements.txt
33
  RUN pip install --no-cache-dir -r /tmp/requirements.txt
34
- # ---------------------------------------------
35
 
36
- # 3. Setup User (Hugging Face runs as ID 1000)
37
  RUN useradd -m -u 1000 user
38
  USER user
39
  ENV HOME=/home/user
40
  WORKDIR $HOME
41
 
42
- # 4. Install Your Custom Chromium
43
- # This copies the folder you uploaded to the repo into the container
44
- COPY --chown=user ./chrome-linux /opt/chromium
45
- RUN chmod +x /opt/chromium/chrome
 
 
 
 
46
 
47
  # 5. Prepare the Start Script
48
  COPY --chown=user start.sh /start.sh
 
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
  # 1. Install System Dependencies
 
8
  RUN apt-get update && apt-get install -y \
9
  wget \
10
  curl \
11
+ unzip \
12
  xz-utils \
13
  xvfb \
14
  libgbm1 \
 
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.1.0/kasmvncserver_focal_1.1.0_amd64.deb && \
28
  apt-get install -y ./kasmvncserver_*.deb && \
29
  rm kasmvncserver_*.deb
30
 
31
+ # 3. Install Python Requirements
32
  COPY requirements.txt /tmp/requirements.txt
33
  RUN pip install --no-cache-dir -r /tmp/requirements.txt
 
34
 
35
+ # 4. Setup User
36
  RUN useradd -m -u 1000 user
37
  USER user
38
  ENV HOME=/home/user
39
  WORKDIR $HOME
40
 
41
+ # --- THE FIX IS HERE ---
42
+ # We REMOVED "COPY ./chrome-linux"
43
+ # We ADDED this block to download Chrome from the internet instead:
44
+ 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 && \
45
+ unzip -q chrome-linux.zip && \
46
+ rm chrome-linux.zip && \
47
+ # Move it to the folder the start script expects
48
+ mv chrome-linux /home/user/chrome-linux
49
 
50
  # 5. Prepare the Start Script
51
  COPY --chown=user start.sh /start.sh