Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +26 -6
Dockerfile
CHANGED
@@ -1,12 +1,32 @@
|
|
1 |
-
FROM python:3
|
|
|
2 |
WORKDIR /data/app
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
&& apt-get clean
|
7 |
-
|
|
|
|
|
|
|
|
|
8 |
COPY requirements.txt ./
|
9 |
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
10 |
COPY . .
|
|
|
11 |
EXPOSE 7860
|
12 |
-
|
|
|
|
1 |
+
FROM python:3.9 # Use a specific Python version for better compatibility
|
2 |
+
|
3 |
WORKDIR /data/app
|
4 |
+
|
5 |
+
# Install system dependencies required for TensorFlow
|
6 |
+
RUN apt-get update && apt-get install -y \
|
7 |
+
wget \
|
8 |
+
python3-dev \
|
9 |
+
python3-pip \
|
10 |
+
build-essential \
|
11 |
+
libopenblas-dev \
|
12 |
+
liblapack-dev \
|
13 |
+
libx11-dev \
|
14 |
+
libglib2.0-0 \
|
15 |
&& apt-get clean
|
16 |
+
|
17 |
+
# Upgrade pip and install TensorFlow
|
18 |
+
RUN pip install --upgrade pip && pip install tensorflow
|
19 |
+
|
20 |
+
# Copy and install dependencies
|
21 |
COPY requirements.txt ./
|
22 |
RUN pip install -r requirements.txt
|
23 |
+
|
24 |
+
# Download the model file
|
25 |
+
RUN wget -O /data/app/sneaker_category_predictor_v2.h5 "https://huggingface.co/thejagstudio/SneakerAI/resolve/main/sneaker_category_predictor_v2.h5?download=true"
|
26 |
+
|
27 |
+
# Copy application files
|
28 |
COPY . .
|
29 |
+
|
30 |
EXPOSE 7860
|
31 |
+
|
32 |
+
CMD ["python", "./main.py"]
|