dakunesu commited on
Commit
11f09d6
·
verified ·
1 Parent(s): a7f0006

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -5,11 +5,17 @@ FROM ubuntu:22.04
5
  ENV DEBIAN_FRONTEND=noninteractive
6
  ENV PORT=7860
7
 
8
- # Install required dependencies
9
  RUN apt-get update && apt-get install -y \
10
  curl \
11
  ca-certificates \
12
- && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
13
 
14
  # Create a non-root user
15
  RUN useradd -m -u 1000 user
@@ -18,12 +24,6 @@ RUN useradd -m -u 1000 user
18
  USER user
19
  WORKDIR /home/user
20
 
21
- # Download and install sshx
22
- RUN curl -sSf https://sshx.io/get | sh
23
-
24
- # Add sshx to PATH
25
- ENV PATH="/home/user/.local/bin:${PATH}"
26
-
27
  # Expose port for Hugging Face Space
28
  EXPOSE 7860
29
 
 
5
  ENV DEBIAN_FRONTEND=noninteractive
6
  ENV PORT=7860
7
 
8
+ # Install required dependencies and download sshx as root
9
  RUN apt-get update && apt-get install -y \
10
  curl \
11
  ca-certificates \
12
+ tar \
13
+ && rm -rf /var/lib/apt/lists/* \
14
+ && curl -sSL https://s3.amazonaws.com/sshx/sshx-x86_64-unknown-linux-musl.tar.gz -o /tmp/sshx.tar.gz \
15
+ && tar -xzf /tmp/sshx.tar.gz -C /tmp \
16
+ && mv /tmp/sshx /usr/local/bin/sshx \
17
+ && chmod +x /usr/local/bin/sshx \
18
+ && rm -f /tmp/sshx.tar.gz
19
 
20
  # Create a non-root user
21
  RUN useradd -m -u 1000 user
 
24
  USER user
25
  WORKDIR /home/user
26
 
 
 
 
 
 
 
27
  # Expose port for Hugging Face Space
28
  EXPOSE 7860
29