Commit
·
346cded
1
Parent(s):
9ba4070
Update Dockerfile
Browse files- Dockerfile +9 -12
Dockerfile
CHANGED
@@ -1,27 +1,24 @@
|
|
1 |
-
|
|
|
2 |
|
|
|
3 |
WORKDIR /app
|
4 |
|
5 |
-
|
6 |
-
libhdf5-dev \
|
7 |
-
gcc \
|
8 |
-
g++ \
|
9 |
-
&& rm -rf /var/lib/apt/lists/*
|
10 |
-
|
11 |
COPY requirements.txt .
|
|
|
|
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
|
|
14 |
COPY app.py .
|
15 |
COPY model.h5 .
|
16 |
COPY tokenizer.pkl .
|
17 |
COPY le_category.pkl .
|
18 |
COPY le_subcategory.pkl .
|
19 |
-
COPY ppo_finetuned_model.zip .
|
20 |
-
|
21 |
-
RUN ls -la /app
|
22 |
-
|
23 |
-
ENV MPLCONFIGDIR=/tmp/matplotlib
|
24 |
|
|
|
25 |
EXPOSE 7860
|
26 |
|
|
|
27 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
+
# Use official Python runtime as base image
|
2 |
+
FROM python:3.9-slim
|
3 |
|
4 |
+
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Copy requirements file
|
|
|
|
|
|
|
|
|
|
|
8 |
COPY requirements.txt .
|
9 |
+
|
10 |
+
# Install dependencies
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
+
# Copy application code and model files
|
14 |
COPY app.py .
|
15 |
COPY model.h5 .
|
16 |
COPY tokenizer.pkl .
|
17 |
COPY le_category.pkl .
|
18 |
COPY le_subcategory.pkl .
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
# Expose port
|
21 |
EXPOSE 7860
|
22 |
|
23 |
+
# Command to run the application
|
24 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|