-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from balnarendrasapa:dev
Add Docker configuration files for deployment
- Loading branch information
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.venv/ | ||
flagged/ | ||
input.png | ||
sample.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Dockerfile | ||
|
||
# Use the official Python base image | ||
FROM ubuntu:22.04 | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy files to the container | ||
COPY . /app | ||
|
||
# Update the package lists | ||
RUN apt-get update \ | ||
&& apt-get install -y python3 python3-pip libgl1-mesa-glx libglib2.0-0 \ | ||
&& apt-get clean | ||
|
||
# Install the required Python packages | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Expose the port on which the app will run | ||
EXPOSE 7860 | ||
|
||
# Set the entrypoint command to run the app.py file | ||
CMD ["python3", "app.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: "3.8" | ||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- "7860:7860" | ||
environment: | ||
- SHARE=True |