Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +17 -19
Dockerfile
CHANGED
|
@@ -1,28 +1,26 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
-
bash \
|
| 6 |
-
git \
|
| 7 |
-
curl \
|
| 8 |
-
wget \
|
| 9 |
-
nano \
|
| 10 |
-
python3 \
|
| 11 |
-
python3-pip \
|
| 12 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
#
|
| 19 |
RUN useradd -m -u 1000 user
|
| 20 |
-
|
|
|
|
| 21 |
WORKDIR /home/user
|
| 22 |
|
| 23 |
-
#
|
|
|
|
|
|
|
|
|
|
| 24 |
EXPOSE 7860
|
| 25 |
|
| 26 |
-
#
|
| 27 |
-
# -W
|
| 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"]
|