Skip to content

Commit

Permalink
Merge pull request #26 from balnarendrasapa:dev
Browse files Browse the repository at this point in the history
Add Docker configuration files for deployment
  • Loading branch information
balnarendrasapa authored Dec 3, 2023
2 parents 1d269fc + cd0affd commit 1988b9c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deployment/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.venv/
flagged/
input.png
sample.png
24 changes: 24 additions & 0 deletions deployment/Dockerfile
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"]
10 changes: 10 additions & 0 deletions deployment/docker-compose.yml
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

0 comments on commit 1988b9c

Please sign in to comment.