Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a way to build with Docker #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Start with a lightweight Python image
FROM python:3.10-slim

# Install necessary build tools and dependencies for PySNARK
RUN apt-get update && \
apt-get install -y --no-install-recommends \
swig \
cmake \
g++ \
git \
npm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install PySNARK from GitHub
RUN pip install git+https://github.com/meilof/pysnark

# Set up a working directory in the container
WORKDIR /app

# Copy your local files (replace with your paths)
COPY . /app

# Default command for the container
CMD ["python3"]

16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@ PySNARK is experimental and **not fit for production environment**.

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/meilof/pysnark/nobackend?filepath=notebooks%2Ftest.ipynb)

## Running with Docker (skip if using pip installation)

Dockerfile is already provided.

**Building:**
```
docker build -t pysnark-env .
```

**Running:**
```
docker run -it --rm -v "$(pwd)/examples:/app" pysnark-env python3 /app/cube.py 3
```



## Installation

```
Expand Down