Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -5
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
# 1. Use
|
| 2 |
-
FROM python:3.
|
| 3 |
|
| 4 |
# 2. Set environment variables to keep things running smoothly
|
| 5 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
@@ -9,7 +9,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
| 9 |
# 3. Set the working directory inside the container
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
-
# 4. Install system tools needed to build certain Python packages
|
| 13 |
RUN apt-get update && \
|
| 14 |
apt-get install -y --no-install-recommends \
|
| 15 |
build-essential \
|
|
@@ -18,10 +18,10 @@ RUN apt-get update && \
|
|
| 18 |
&& apt-get clean && \
|
| 19 |
rm -rf /var/lib/apt/lists/*
|
| 20 |
|
| 21 |
-
# 5. Create the directory where
|
| 22 |
RUN mkdir -p /tmp/data
|
| 23 |
|
| 24 |
-
# 6. Copy your requirements.txt first
|
| 25 |
COPY requirements.txt .
|
| 26 |
|
| 27 |
# 7. Install all your Python dependencies from your actual requirements.txt
|
|
|
|
| 1 |
+
# 1. Use Python 3.11 (This fixes the networkx error!)
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# 2. Set environment variables to keep things running smoothly
|
| 5 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
|
|
| 9 |
# 3. Set the working directory inside the container
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
+
# 4. Install system tools needed to build certain Python packages
|
| 13 |
RUN apt-get update && \
|
| 14 |
apt-get install -y --no-install-recommends \
|
| 15 |
build-essential \
|
|
|
|
| 18 |
&& apt-get clean && \
|
| 19 |
rm -rf /var/lib/apt/lists/*
|
| 20 |
|
| 21 |
+
# 5. Create the directory where the database will store its files
|
| 22 |
RUN mkdir -p /tmp/data
|
| 23 |
|
| 24 |
+
# 6. Copy your requirements.txt first
|
| 25 |
COPY requirements.txt .
|
| 26 |
|
| 27 |
# 7. Install all your Python dependencies from your actual requirements.txt
|