||10 hours ago|
|.github||2 months ago|
|_LICENSE||3 months ago|
|_docs/api||2 months ago|
|_sandbox||4 years ago|
|accounts||2 days ago|
|apiv2||3 weeks ago|
|bookmarks||3 weeks ago|
|clustering||2 months ago|
|comments||2 months ago|
|docker||2 months ago|
|donations||2 months ago|
|favorites||2 months ago|
|follow||3 days ago|
|forum||3 weeks ago|
|freesound||16 hours ago|
|general||1 day ago|
|geotags||4 days ago|
|media||1 week ago|
|messages||1 month ago|
|monitor||2 months ago|
|ratings||2 months ago|
|search||17 hours ago|
|similarity||2 months ago|
|sounds||10 hours ago|
|support||2 months ago|
|tagrecommendation||2 months ago|
|tags||16 hours ago|
|templates||1 week ago|
|templates_bw||10 hours ago|
|tickets||2 months ago|
|utils||12 hours ago|
|webroot||5 years ago|
|wiki||2 months ago|
|.dockerignore||2 years ago|
|.eslintrc||5 years ago|
|.gitignore||3 weeks ago|
|.prettierrc||5 years ago|
|DEVELOPERS.md||9 months ago|
|README.md||2 months ago|
|docker-compose.test.yml||2 months ago|
|docker-compose.yml||2 months ago|
|environment||3 years ago|
|freesound.code-workspace||2 months ago|
|manage.py||2 months ago|
|package-lock.json||2 years ago|
|package.json||2 years ago|
|requirements.txt||2 months ago|
|requirements_clustering.txt||2 months ago|
This repository contains the source code of the Freesound website.
Freesound is a project by the Music Technology Group (MTG), Universitat Pompeu Fabra (UPF).
All the source code in this repository is licensed under the GNU Affero General Public License v3. Some of the dependencies might have their own licenses. See the _LICENSE folder for more details.
For a list of authors please check out the contributors page.
Freesound is composed of a number of different services which can be run and orchestrated using Docker. The main service is provided by the
web container which runs the Freesound Django application. Check out this blog post for some information about the Freesound technology stack. If you're going to do development on Freesound, please check the DEVELOPERS file for some guidelines.
Below are instructions for setting up a local Freesound installation for development. It is assumed that you have a working Docker installation.
Setting up Freesound for development in 13 easy steps
Clone source code repository
git clone email@example.com:MTG/freesound.git cd freesound
Create a directory named
freesound-datainside the repository folder
Download the Freesound development data zip file (~20GB) and uncompress it inside
freesound-data. You should get permission to download this file from Freesound admins. File structure should look like this:
freesound/ freesound/freesound-data/ freesound/freesound-data/analysis/ freesound/freesound-data/avatar/ ...
Download Freesound development similarity index and the Freesound tag recommendation models and place their contents under
freesound-data/tag_recommendation_modelsdirectories respectively (you'll need to create the directories). You should get permission to download these files from Freesound admins.
freesound/local_settings.example.pyfile so you can customise Django settings if needed and create a
.envfile with your local user UID and other useful settings. These other settings include
LOCAL_PORT_PREFIXwhich can be used to allow parallell local installations running on the same machine (provided that these to variables are different in the local installations), and
FS_BIND_HOSTwhich you should set to
0.0.0.0if you need to access your local Fresound services from a remote machine.
cp freesound/local_settings.example.py freesound/local_settings.py echo FS_USER_ID=$(id -u) > .env echo COMPOSE_PROJECT_NAME=freesound >> .env echo LOCAL_PORT_PREFIX= >> .env echo FS_BIND_HOST= >> .env
[Optional] Create API credentials for the 3rd party services listed below and add them to your own
settings.pyto know the config parameter names that you need to fill in):
Build the base Freesound Docker image
make -C docker
Build all Docker containers. The first time you run this command can take a while as a number of Docker images need to be downloaded and things need to be installed and compiled.
Download the Freesound development database dump (~50MB), run the database container and load the data into it. You should get permission to download this file from Freesound admins.
docker-compose up -d db docker-compose run --rm db psql -h db -U freesound -d freesound -f /freesound-data/db_dev_dump/freesound_dev_db-2018-01-12-anonymised.sql
Update database by running Django migrations
docker-compose run --rm web python manage.py migrate
Create a superuser account to be able to login to the local Freesound website and to the admin site
docker-compose run --rm web python manage.py createsuperuser
Run services 🎉
When running this command, the most important services that make Freesound work will be run locally. This includes the web application and database, but also the search engine, cache manager, queue manager and asynchronous workers including audio processing. You should be able to point your browser to
http://localhost:8000 and see the Freesound website up and running!
Build the search index so you can search for sounds and forum posts
# Open a new terminal window so the services started in the previous step keep running docker-compose run --rm web python manage.py reindex_search_engine_sounds docker-compose run --rm web python manage.py reindex_search_engine_forum
After following the steps you'll have a functional Freesound installation up and running, with the most relevant services properly configured. You can run Django's shell plus command like this:
docker-compose run --rm web python manage.py shell_plus
web container mounts a named volume for the home folder of the user running the shell plus process, command history should be kept between container runs :)
(extra step) The steps above will get Freesound running, but to save resources in your local machine some non-essential services will not be started by default. If you look at the
docker-compose.ymlfile, you'l see that some services are marked with the profile
all. These services include sound similarity, search results clustering and the audio analyzers. To run these services you need to explicitely tell
--profile(note that some services need additional configuration steps (see Freesound analysis pipeline section in
docker-compose --profile analyzers up # To run all basic services + sound analyzers docker-compose --profile all up # To run all services
You can run tests using the Django test runner in the
web container like that:
docker-compose run --rm web python manage.py test --settings=freesound.test_settings