void0028 commited on
Commit
3c4932c
·
verified ·
1 Parent(s): e62346a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -19
Dockerfile CHANGED
@@ -1,28 +1,26 @@
1
- FROM node:18-bullseye
2
 
3
- # Install basics
4
- RUN apt-get update && apt-get install -y \
5
- bash \
6
- git \
7
- curl \
8
- wget \
9
- nano \
10
- python3 \
11
- python3-pip \
12
- && rm -rf /var/lib/apt/lists/*
13
 
14
- # Install ttyd (the web terminal)
15
- RUN curl -L https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -o /usr/bin/ttyd \
16
- && chmod +x /usr/bin/ttyd
 
 
17
 
18
- # Create a user so we aren't root (safer)
19
  RUN useradd -m -u 1000 user
20
- USER user
 
21
  WORKDIR /home/user
22
 
23
- # Expose the HF port
 
 
 
24
  EXPOSE 7860
25
 
26
- # Start the terminal on port 7860
27
- # -W means writeable (you can type)
28
  CMD ["ttyd", "-p", "7860", "-W", "bash"]
 
1
+ FROM ubuntu:22.04
2
 
3
+ # Prevent the terminal from asking for your timezone and freezing the build
4
+ ENV DEBIAN_FRONTEND=noninteractive
 
 
 
 
 
 
 
 
5
 
6
+ # Update and install the goods
7
+ # ttyd is in the official repos now, so we don't need sketch curl commands
8
+ RUN apt-get update && \
9
+ apt-get install -y ttyd bash nano curl wget git python3 python3-pip && \
10
+ rm -rf /var/lib/apt/lists/*
11
 
12
+ # Set up the user for Hugging Face permissions (ID 1000)
13
  RUN useradd -m -u 1000 user
14
+
15
+ # Set up the working directory
16
  WORKDIR /home/user
17
 
18
+ # Switch to the user so we aren't running as root (security 101)
19
+ USER user
20
+
21
+ # Open the port
22
  EXPOSE 7860
23
 
24
+ # Launch the terminal
25
+ # -W makes it writable (so you can actually type)
26
  CMD ["ttyd", "-p", "7860", "-W", "bash"]