Charan5775 commited on
Commit
d795ffa
·
verified ·
1 Parent(s): f71055b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -10
Dockerfile CHANGED
@@ -1,4 +1,3 @@
1
- # WARNING: This will likely NOT work on Hugging Face Spaces due to DinD limitations
2
  FROM ubuntu:22.04
3
 
4
  # Install dependencies
@@ -7,24 +6,26 @@ RUN apt-get update && \
7
  apt-get clean && \
8
  rm -rf /var/lib/apt/lists/*
9
 
10
- # Install Docker (required for Kasm, but Hugging Face won't allow DinD)
11
  RUN curl -fsSL https://get.docker.com -o get-docker.sh && \
12
  sh get-docker.sh && \
13
  usermod -aG docker root
14
 
15
- # Install Kasm Workspaces
16
- RUN curl -L https://kasm-static-content.s3.amazonaws.com/kasm_release_1.17.0.7f020d.tar.gz | tar xz -C /tmp && \
17
- /tmp/install.sh -N
 
18
 
19
- # Configure Kasm to use port 7860 for Hugging Face compatibility
20
- RUN sed -i 's/PORT=3000/PORT=7860/g' /opt/kasm/config/nginx.conf
 
21
 
22
- # Expose required port
23
- EXPOSE 7860
24
 
25
  # Health check
26
  HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
27
- CMD curl -f http://localhost:7860/health || exit 1
28
 
29
  # Start Kasm services
30
  CMD ["/opt/kasm/bin/start"]
 
 
1
  FROM ubuntu:22.04
2
 
3
  # Install dependencies
 
6
  apt-get clean && \
7
  rm -rf /var/lib/apt/lists/*
8
 
9
+ # Install Docker (required for Kasm's container management)
10
  RUN curl -fsSL https://get.docker.com -o get-docker.sh && \
11
  sh get-docker.sh && \
12
  usermod -aG docker root
13
 
14
+ # Download and extract Kasm Workspaces
15
+ WORKDIR /tmp
16
+ RUN curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.17.0.7f020d.tar.gz && \
17
+ tar -xf kasm_release_1.17.0.7f020d.tar.gz
18
 
19
+ # Run the installation script with non-interactive mode
20
+ # Note: The -N flag is for non-interactive mode, but the script is in kasm_release/ directory
21
+ RUN bash kasm_release/install.sh -N
22
 
23
+ # Kasm runs on port 443 by default
24
+ EXPOSE 443
25
 
26
  # Health check
27
  HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
28
+ CMD curl -f https://localhost:443/health || exit 1
29
 
30
  # Start Kasm services
31
  CMD ["/opt/kasm/bin/start"]