Update Dockerfile
Browse files- Dockerfile +18 -17
Dockerfile
CHANGED
@@ -1,28 +1,29 @@
|
|
1 |
-
#
|
2 |
-
FROM python:3.10
|
3 |
|
4 |
-
#
|
5 |
RUN apt-get update && \
|
6 |
apt-get install -y openjdk-11-jdk curl && \
|
7 |
-
|
8 |
|
9 |
-
#
|
10 |
-
ENV JAVA_HOME
|
11 |
-
ENV PATH
|
12 |
|
13 |
-
#
|
14 |
WORKDIR /app
|
15 |
|
16 |
-
#
|
17 |
-
COPY
|
18 |
-
COPY requirements.txt /app
|
19 |
-
COPY deep_learning_model(okt_drop).h5 /app
|
20 |
-
COPY tokenizer(okt_drop).json /app
|
21 |
-
COPY scaler.pkl /app
|
22 |
-
|
23 |
-
# ํ์ํ Python ํจํค์ง ์ค์น
|
24 |
RUN pip install --no-cache-dir -r requirements.txt
|
25 |
|
26 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
CMD ["python", "app.py"]
|
28 |
|
|
|
|
1 |
+
# Base image
|
2 |
+
FROM python:3.10
|
3 |
|
4 |
+
# Install OpenJDK-11 and curl
|
5 |
RUN apt-get update && \
|
6 |
apt-get install -y openjdk-11-jdk curl && \
|
7 |
+
rm -rf /var/lib/apt/lists/*
|
8 |
|
9 |
+
# Set JAVA_HOME environment variable
|
10 |
+
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
|
11 |
+
ENV PATH $JAVA_HOME/bin:$PATH
|
12 |
|
13 |
+
# Set the working directory
|
14 |
WORKDIR /app
|
15 |
|
16 |
+
# Copy the requirements file and install Python dependencies
|
17 |
+
COPY requirements.txt .
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
RUN pip install --no-cache-dir -r requirements.txt
|
19 |
|
20 |
+
# Copy the application code
|
21 |
+
COPY app.py .
|
22 |
+
|
23 |
+
# Expose the port Gradio will run on
|
24 |
+
EXPOSE 7860
|
25 |
+
|
26 |
+
# Command to run the application
|
27 |
CMD ["python", "app.py"]
|
28 |
|
29 |
+
|