Upload folder using huggingface_hub
Browse files- Dockerfile +14 -4
Dockerfile
CHANGED
|
@@ -1,7 +1,17 @@
|
|
| 1 |
-
FROM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
# Install Rust and build dependencies
|
| 4 |
-
RUN apt-get update && apt-get install -y curl build-essential cmake
|
| 5 |
# Set up a new user named "user" with user ID 1000 (Required for HF Spaces)
|
| 6 |
RUN useradd -m -u 1000 user
|
| 7 |
|
|
@@ -42,4 +52,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 42 |
|
| 43 |
EXPOSE 7860
|
| 44 |
|
| 45 |
-
CMD ["
|
|
|
|
| 1 |
+
FROM ubuntu:24.04
|
| 2 |
+
|
| 3 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
+
|
| 5 |
+
# Install Python 3.12, pip, curl, build-essential, and cmake
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
python3 python3-pip python3-venv curl build-essential cmake \
|
| 8 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
+
# Create a virtual environment so pip installs work smoothly
|
| 11 |
+
ENV VIRTUAL_ENV=/opt/venv
|
| 12 |
+
RUN python3 -m venv $VIRTUAL_ENV
|
| 13 |
+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
| 14 |
|
|
|
|
|
|
|
| 15 |
# Set up a new user named "user" with user ID 1000 (Required for HF Spaces)
|
| 16 |
RUN useradd -m -u 1000 user
|
| 17 |
|
|
|
|
| 52 |
|
| 53 |
EXPOSE 7860
|
| 54 |
|
| 55 |
+
CMD ["python3", "app.py"]
|