Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- Dockerfile +2 -3
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
| 3 |
# Install uv
|
| 4 |
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
@@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y \
|
|
| 15 |
# Copy the final requirements file into the container
|
| 16 |
COPY req_final.txt .
|
| 17 |
|
| 18 |
-
# Install dependencies using uv
|
| 19 |
# Remove msvc-runtime since it is Windows-only
|
| 20 |
RUN sed -i '/msvc-runtime/d' req_final.txt && \
|
| 21 |
uv pip install --system --no-cache -r req_final.txt gunicorn
|
|
@@ -29,7 +29,6 @@ RUN useradd -m -u 1000 user && \
|
|
| 29 |
chown -R user:user /app
|
| 30 |
USER user
|
| 31 |
|
| 32 |
-
# Set up a generic entrypoint for Hugging Face space
|
| 33 |
# HF Spaces bind to port 7860 by default for Docker spaces
|
| 34 |
ENV PORT=7860
|
| 35 |
EXPOSE 7860
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
|
| 3 |
# Install uv
|
| 4 |
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
|
|
| 15 |
# Copy the final requirements file into the container
|
| 16 |
COPY req_final.txt .
|
| 17 |
|
| 18 |
+
# Install dependencies using uv (Python 3.11 to match req_final.txt pins)
|
| 19 |
# Remove msvc-runtime since it is Windows-only
|
| 20 |
RUN sed -i '/msvc-runtime/d' req_final.txt && \
|
| 21 |
uv pip install --system --no-cache -r req_final.txt gunicorn
|
|
|
|
| 29 |
chown -R user:user /app
|
| 30 |
USER user
|
| 31 |
|
|
|
|
| 32 |
# HF Spaces bind to port 7860 by default for Docker spaces
|
| 33 |
ENV PORT=7860
|
| 34 |
EXPOSE 7860
|